# 引用不可点击的链接使其可点击

**URL:** https://meta.discourse.org/t/quoting-non-clickable-links-makes-them-clickable/266534
**Category:** Bug
**Tags:** pr-welcome
**Created:** [2023年五月29日 14:38 UTC](https://meta.discourse.org/t/quoting-non-clickable-links-makes-them-clickable/266534 "2023-05-29T14:38:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2023年五月29日 14:38 UTC](https://meta.discourse.org/t/quoting-non-clickable-links-makes-them-clickable/266534/1 "2023-05-29T14:38:32Z")

</div>

这里有一个网站链接，它被故意用反引号包裹起来，使其无法点击，例如：

```plaintext
`https://www.example.com`

```

然后它会显示成这样：

`https://www.example.com`

无法点击 👍🏻

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2023年五月29日 14:39 UTC](https://meta.discourse.org/t/quoting-non-clickable-links-makes-them-clickable/266534/2 "2023-05-29T14:39:10Z")

</div>

但是现在如果我引用那个链接：

> [@Richie](#):
>
> [https://www.example.com](https://www.example.com)

它就变成可点击的了 👎🏻

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2023年五月29日 19:02 UTC](https://meta.discourse.org/t/quoting-non-clickable-links-makes-them-clickable/266534/3 "2023-05-29T19:02:14Z")

</div>

感谢 #pr-welcome 标签 @nat 😃

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [2023年五月30日 00:16 UTC](https://meta.discourse.org/t/quoting-non-clickable-links-makes-them-clickable/266534/4 "2023-05-30T00:16:11Z")

</div>

从标题来看，我以为这与某种（可能不明智的）阻止右键单击的 JavaScript 有关。

也许：“当 URL 被反引号故意设为不可点击时，它们会被渲染为超链接”？

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [2023年五月30日 09:45 UTC](https://meta.discourse.org/t/quoting-non-clickable-links-makes-them-clickable/266534/5 "2023-05-30T09:45:30Z")

</div>

选择方法不同，行为也不同。

1. 选择内容前后：它会捕获整个 markdown，并保留反引号。

2. 手动拖动鼠标选择行：它只选择文本，因此不会保留反引号。

3. 三击鼠标选择整行：它会选择整行文本 + 不可见的包装元素，例如 HTML 标签。因此，反引号会被保留。

我不确定这是否可以修复，或者是否容易修复，因为它似乎更多地取决于操作系统或浏览器如何进行选择。但我不是开发人员。 🙂
