Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call for PR: use Pulldown-CMark to extract match expressions #116

Open
SichangHe opened this issue May 30, 2024 · 1 comment
Open

Call for PR: use Pulldown-CMark to extract match expressions #116

SichangHe opened this issue May 30, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SichangHe
Copy link
Collaborator

Context

Currently, mdBook-KaTeX uses simple heuristics I hand-rolled to identify and extract math expressions. Various Markdown markups are not handled, e.g., indented code blocks and HTML.

Recently, Pulldown-CMark started supporting math. This is some great news, as Pulldown-CMark should be much more robust and feature-rich in this regard.

To reliably convert Pulldown-CMark events back to Markdown text, it would also be nice to wait until Pulldown-CMark-to-Cmark supports preserving escape characters.

Pushback

The reasons I am not very interested in implementing this myself are as follows:

  • I am fine with the current heuristics for my use cases.
  • A proper implementation shall take quite some efforts, and will likely even introduce new bugs.
  • I am sick of messing with Pulldown-CMark as of recently, from making the FMTM formatter.

If anyone is interested in this, please try and make a PR!

@SichangHe SichangHe added enhancement New feature or request help wanted Extra attention is needed labels May 30, 2024
@SichangHe
Copy link
Collaborator Author

Another regression would be Pulldown-CMark does not support custom math delimiters like we do now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant