hackmdio / hackmdio/hackmd-io-issues

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

Open
#254 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
40
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### 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](https://user-images.githubusercontent.com/1610035/114284640-85a2ce80-9a51-11eb-8dde-ac4bbe6ecb55.png)

[Take a look at this demo](https://hackmd.io/qCMlLXlBTReZFdSHM-K_Xw?view)

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

```markdown
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.