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

Support for external parsers like CommonMark #2519

Open
kbarros opened this issue Jun 2, 2024 · 2 comments
Open

Support for external parsers like CommonMark #2519

kbarros opened this issue Jun 2, 2024 · 2 comments

Comments

@kbarros
Copy link

kbarros commented Jun 2, 2024

It has been hinted in various comments that support is planned for external markdown parsers (e.g., here, here, and here). There is an old branch exploring it. I would love this feature! ❤️

My personal use case would be writing very math heavy documentation (e.g., https://sunnysuite.github.io/Sunny.jl/dev/structure-factor.html). It would be a huge boon to be able to use the $ and $$ syntax to get inline Latex, which would unlock the "live preview" feature available in editors like VSCode. That transforms the writing experience.

@mortenpi
Copy link
Member

mortenpi commented Jun 2, 2024

Yep, good to have a dedicated issue. The interface should, basically, be that you provide MarkdownAST AST data structure as a page. CommonMark could potentially be special cased though, so that you could just swap out the default parser for all .md files (probably done via a Pkg extension initially?). But there's also value in being able to override the parser for single files (e.g. to proprely parse READMEs).

@kbarros
Copy link
Author

kbarros commented Jun 6, 2024

Some additional setup work seems fine. To make sure I understand, the feature would enable, say, CommonMark parsing (the Latex $$ for example), while also allowing for things like Documenter hyperrefs using, e.g., [`foo`](@ref)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants