hackmd-io-issues icon indicating copy to clipboard operation
hackmd-io-issues copied to clipboard

Comments are broken when an abbreviation is present on the commented line

Open syenchuk opened this issue 4 years ago • 0 comments

Is this a hackmd.io issue?

  • [x] Yes, the bug happens on https://hackmd.io

What's the problem

Sometimes, comments are linked to multiple portions of the document, instead of being linked to the portion selected by the user.

Current behaviour

image

Take a look at this demo

To reproduce the issue, create a new document with the following content and try commenting different lines:

This is a line without acronyms and without comments.

This is a line without acronyms with working comments.

This is a line with an acronym, with broken comments. Did you know who invented HTTP?

*[HTTP]: HyperText Transfer Protocol

Expected behaviour

The comment should be linked only to the selected portion of the document. No other portions of the document should be highlighted or linked to the original comment.

Environment

I use HackMD on the web.

syenchuk avatar Apr 10 '21 21:04 syenchuk