zestedesavoir / zmarkdown

Live demo: https://zestedesavoir.github.io/zmarkdown/
MIT License
226 stars 53 forks source link

Fix LaTeX hlLine syntax #422

Closed StaloneLab closed 3 years ago

StaloneLab commented 3 years ago

fixes: #417

Recent changes to improve HTML code unfortunately had no effect on LaTeX, leading to some bugs such as the one cited above. In order to fix the problem, I took a kinda complicated path; the idea is that our code stringifier for rebber was a bit too specific and ZdS-related, so I replaced it by a generic one, and moved the specific ZdS part into zmarkdown.

From then, I decided to move the currently HTML-specific part of the stringification into a separate remark plugin, so that the changes could be used both by HTML and LaTeX. After all this had been done, I cherry-picked #421 because it would otherwise have failed to merge.

Note: this requires a breaking change for rebber AND rebber-plugin, but not necessarily for zmarkdown, as it still renders as before, with an added bugfix.