Pasting same title in html/markdown causes output to be nested

Open
#96 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start with the linked CodePen reproduction and compare what happens when copying each example into a GitHub comment box. Trace the paste handling in the repository to identify why identical text/html and text/plain titles produce non-nested output; done means the reproduction returns the expected nested Markdown link.

Written by the indexing model from the issue text.

Description

This is an issue that was forwarded to me, but I'm able to reproduce.

If text/html and text/plain contain the same title, the output we return is nested.

Expected output: [[Same](https://google.com/)](https://google.com)"
Actual output: [Same](https://google.com)

Reproduction: https://codepen.io/tarngerine/pen/ZEZBEpy

Try pressing the Copy button on either of the examples and try pasting into any GitHub comment box.

Dominant language
JavaScript
Stars
234
Forks
47
Avg merge
1d 12h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/paste-markdown

All issues in github/paste-markdown

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.