gnab / remark

A simple, in-browser, markdown-driven slideshow tool.
http://remarkjs.com
MIT License
12.68k stars 856 forks source link

highlightSpans behaves incorrectly with backticks as the first character of a line #615

Open nrinaudo opened 4 years ago

nrinaudo commented 4 years ago

I sometimes want to highlight the first word of a line of code. This, unfortunately, appears to be broken (I've tried on 0.15.0): remark.js seems to not treat backticks, when they are the first character of a line, as a "highlight span", and the resulting output will contain both backticks, and no highlighting.

I've added a screenshot for clarity: remarkjs-backtick