gpoore / codebraid

Live code in Pandoc Markdown
BSD 3-Clause "New" or "Revised" License
367 stars 13 forks source link

conversion from md to PDF gives StopIteration when escaping italics #36

Closed amichuda closed 3 years ago

amichuda commented 3 years ago

When converting from markdown to PDF, and you escape asterisks, you get a StopIteration error. For example:

A\*

and run codebraid pandoc -o test.pdf test.md

gpoore commented 3 years ago

The algorithm that synchronizes code with line numbers in the source document was having issues with backslash escapes. The last commit simplifies this process and should prevent these sorts of issues in the future. I'm trying to wrap up a few additional issues, and will then put a new version up on PyPI.