remove-markdown icon indicating copy to clipboard operation
remove-markdown copied to clipboard

Horizontal rules are incorrectly matched

Open itsramiel opened this issue 4 months ago • 0 comments

Hi,

The horizontal rule regex incorrectly matches result leaving some markdown unremoved.

The current regex: https://github.com/zuchka/remove-markdown/blob/c96417bbb16a9e89dfc0b3dfafd306ad30a08867/index.js#L15

matches 3 or more -, *, _ followed by whitespace

There are two issues:

I came across this when having a list with a bold word in the beginning so:

- **Bold**

which wrongle matches the - ** and leaves it at Bold**. This is both case 1 and 2 from above where it matched mixing characters and also where there are nonspace characters afterwards

itsramiel avatar Oct 18 '24 07:10 itsramiel