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:
- Add optional syntax support to this plugin but disable it by default. Add a CLI argument for enabling the optional syntax.
- Make a
mdformat-myst-extensions (or similar name) plugin that depends on mdformat-myst but adds optionals on top.
- Very similar to option 2 but different naming. Make a
mdformat-myst-core and move this plugin in its current state there. Then make this plugin require it and add optional syntax support.
- Keep this plugin as "myst core" only and do not create a "mdformat full" plugin at all. Require separate plugin for each optional syntax that a user wishes to enable. We then end up having
mdformat-colon-fence, mdformat-amsmath etc.
I think my favorite at least currently is option number 4, having the following strong points:
- keeps
mdformat-myst simple and stable
- learning from the past: it's been useful how e.g.
tables syntax is in its own plugin that can be collaboratively enabled by mdformat-gfm or mdformat-myst (whichever happens to run first)
- it's not yet clear if there's demand for any other optionals besides
colon-fence
- transition from option 4 to any of the others is easy, if desired later
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-mystbut adds optionals on top.mdformat-myst-coreand move this plugin in its current state there. Then make this plugin require it and add optional syntax support.mdformat-colon-fence,mdformat-amsmathetc.I think my favorite at least currently is option number 4, having the following strong points:
mdformat-mystsimple and stabletablessyntax is in its own plugin that can be collaboratively enabled bymdformat-gfmormdformat-myst(whichever happens to run first)colon-fence