goessner / markdown-it-texmath

Support TeX math equations with your Markdown documents.
MIT License
161 stars 29 forks source link

fix bug in map: it is supposed to be the index of the next line, not the current line. #43

Closed williamstein closed 2 years ago

williamstein commented 2 years ago

See, e.g., other plugins such as https://github.com/markdown-it/markdown-it-container/blob/master/index.js. I was working around this in my code. It's the sort of thing you might not notice if you're just processing markdown to create html. However, I use markdown-it only to tokenize markdown, then keep track of what markdown produced the given tokens for the purposes of caching, and then it is critically important that the map be correct.

goessner commented 2 years ago

Thanks for fixing. Fix was inserted manually with Version 1.0