russross / blackfriday

Blackfriday: a markdown processor for Go
Other
5.41k stars 596 forks source link

Add math extension #700

Open soypat opened 1 year ago

soypat commented 1 year ago

Hey, I built this PR to discuss what form a Math extension could have. This would be useful for rendering LaTeX output and for having HTML content that can be displayed using MathJAX or Katex.

There is an issue which is nearly four years old on this matter(https://github.com/russross/blackfriday/issues/504). I believe with the new v2 engine this would be a change that does not break existing programs since math nodes would not be parsed without enabling this extension. @j2kun also created an issue on this subject a while ago and another in the Hugo project and the issue has still not been solved.

It is worth noting the latex renderer link by @Ambrevar in this projects README is broken. I would like to replace it with a working LaTeX renderer in the future, but before that I'd like to have a few opinions on what best to do about the math extension functionality.