laobubu / HyperMD

A WYSIWYG Markdown Editor for browsers. Break the Wall between writing and previewing.
MIT License
1.47k stars 137 forks source link

Hypermd syntax highlighter stops working inside a code block (Obsidian's Admonition-plugin, CodeMirror) #80

Open mikkovedru opened 2 years ago

mikkovedru commented 2 years ago

The bug was originally reported here in the Obsidian's Admonition-plugin repo, but then became clear that the bug is not in the plugin, nor is it at the CodeMirror end.

Copy of the original bug report (please check for more comments):

How to reproduce the bug

  1. Add 3 test lines inside the admonition: image
  2. Use Obsidian/markdown quote feature(>) on the second line. BUG: Notice that syntax highlighter stopped working on all the lines even below the quoted one. image

Other interesting detail

Putting a code block returns highlighting back to normal. image

Versions

valentine195 commented 2 years ago

Specifically, the Obsidian Admonition plugin just extends the hypermd language mode. This issue occurs in a codeblock set to that language.