github / github/paste-markdown

Markdown copy-paste bug: link jumps

Aperta
#94 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
234
Fork
47
Merge medio
1g 12h
PR unite (30g)
5

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Reproduce the issue by copying the sentence in the report and pasting it into a GitHub comment field, then trace the paste-handling entry point in the repository. Compare the pasted Markdown with the expected three-link output shown in the issue. Done means the third link remains attached to its label without changing the other links.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.