mathigon/studio

Markdown Parser Improvements

plegner opened this issue · 0 comments

To parse the course markdown, we currently use marked.js, together with numerous string/regex-based extensions, e.g. to add HTML blocks, inline blanks and variables, and many other elements.

This approach is difficult to test and doesn't work well with nested elements (e.g. blanks inside a table, or italic text inside a blank). We should switch to a more robust method by first tokenizing the text.

Marked.js offers some support for plugins and extensions, but it might also be necessary to switch to a different parser like markdown-it.