github / github/paste-markdown

Markdown copy-paste bug: link jumps

未关闭
#94 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
234
派生
47
平均合并
1 天 12 小时
30 天内合并 PR
5

描述

I'm copying a mere line of text from my own older post to quote it in a new post.
This line got 3 embedded urls, two of which are copied correctly, but the 3rd breaks weirdly.

**Reproduction Steps**

1. Select the sentence below and hit CTRL+C:
* Blah-blah [[1](https://goo.gl)], [[2](https://goo.gl)] foo z2-3, bar [[3](https://goo.gl)].
* Underlying markdown code:
```
Blah-blah [[1](https://goo.gl)], [[2](https://goo.gl)] foo z2-3, bar [[3](https://goo.gl)].
```
* Underlying html code (obtained with Right-click -> Inspect -> Copy element):
```

Blah-blah [1], [2] foo z2-3, bar [3].


```

2. Find any "Add a comment" text input field on https://github.com/ and CTRL+V there. The result looks like this (note that the last link suddenly "jumped"):

* Blah-blah [[1](https://goo.gl/)], [[2](https://goo.gl/)] foo z2-[3](https://goo.gl/), bar [3].

* Same as code:

```
Blah-blah [[1](https://goo.gl/)], [[2](https://goo.gl/)] foo z2-[3](https://goo.gl/), bar [3].
```

I've originally reported this to https://support.github.com/contact/bug-report , but they asked me to report it here.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。