-
Notifications
You must be signed in to change notification settings - Fork 2
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
Strategy for optional MyST syntax #5
Comments
@ichard26 sorry for a horribly long post, but in a nutshell, I propose that for pip install mdformat-myst mdformat-colon-fence I don't have the need or motivation to create that plugin right now myself, but will help and support you or anyone else willing to do so. Here's a plugin template to get started btw. |
Sounds good, I'll look into it, totally new to this but it looks fun too! |
Some implementation pointers: The colon fence extension for the Markdown parser lies in To enable that in the mdformat plugin one needs to do from markdown_it import MarkdownIt
from mdit_py_plugins.colon_fence import colon_fence_plugin
def update_mdit(mdit: MarkdownIt) -> None:
mdit.use(colon_fence_plugin) Then what is needed is the renderer function for |
yep for executablebooks/rst-to-myst#18, will need colon_fence, deflist, and substitution (all from mdit_py_plugins) |
Soooooo, I totally forgot about this since psf/black ended up not using colon_fence, but I am still willing to implement |
do you want to transfer this repo to executablebooks @hukkin |
Makes sense to me. Transferred! EDIT: Seems I lost admin rights in the process. @chrisjsewell would you be able to fix that? |
yep you should have maintenance rights now 👍 |
I would really like the ability to turn on/off MyST syntax, so I can easily use I just want to open the discussion back up and offer my help. What is the current block to progressing this forward? Thanks for your work, |
I've made a comment of another common strategy to control mdformat plugins. |
The current state is that mdformat-myst only supports syntax that is enabled by default in myst-parser. User @ichard26 has voiced the need for optional syntax support (colon fence in particular). The purpose of this issue is to plan how support for optional syntax should be implemented.
I like that there is way to enable default syntax only so we shouldn't simply add optional syntax support the same way we do for non-optionals, as that would prevent installing "myst core" only. So that leaves us with a few options:
mdformat-myst-extensions
(or similar name) plugin that depends onmdformat-myst
but adds optionals on top.mdformat-myst-core
and move this plugin in its current state there. Then make this plugin require it and add optional syntax support.mdformat-colon-fence
,mdformat-amsmath
etc.I think my favorite at least currently is option number 4, having the following strong points:
mdformat-myst
simple and stabletables
syntax is in its own plugin that can be collaboratively enabled bymdformat-gfm
ormdformat-myst
(whichever happens to run first)colon-fence
The text was updated successfully, but these errors were encountered: