# 请不要在 Markdown 中粘贴 URL 时重复链接

**URL:** <https://meta.discourse.org/t/please-dont-double-link-urls-if-one-pastes-over-a-url-in-markdown/210793>\
**Category:** Bug\
**Created:** [2021 年12 月 2 日 00:24 UTC](https://meta.discourse.org/t/please-dont-double-link-urls-if-one-pastes-over-a-url-in-markdown/210793 "2021-12-02T00:24:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)\
发布日期： [2021 年12 月 2 日 01:55 UTC](https://meta.discourse.org/t/please-dont-double-link-urls-if-one-pastes-over-a-url-in-markdown/210793/2 "2021-12-02T01:55:53Z")

</div>

> [@mattdm](#):
>
> 我注意到了这一点，并复制了正确的 URL `https://example.org/the-right-place`，然后粘贴，结果却令人困惑。

第二次粘贴时，你具体高亮了什么？如果 markdown 已经设置为 `[The Right Place](https://example.org/the-wrong-url)`，我高亮 `https://example.org/the-wrong-url` 并粘贴 `https://example.org/the-right-place`，它只会用第二个 URL 替换第一个 URL。

> [@mattdm](#):
>
> 这个代码_能不能_调整一下，_至少_不要对 markdown 链接文本这样做，但实际上可能永远不要对任何 URL 做，因为
> 
> ```plaintext
> [https://example.org/the-wrong-url](https://example.org/the-right-place)
> 
> ```
> 
> 似乎不是任何人应该被鼓励做的事情——更不用说被软件试图在错误的时间提供帮助而诱骗去做了。

另外，将一个独立的 URL 粘贴到另一个 URL 上只会替换它。据我所见，它不会这样做。

也许这些问题已经修复了？

---

_[View the full topic](https://meta.discourse.org/t/please-dont-double-link-urls-if-one-pastes-over-a-url-in-markdown/210793)._
