Open
Description
Currently, it can be a bit confusing to understand in which order rules will be applied, and how they are "inter-connected"
For example, if you have a plugin like:
pub fn add(md: &mut MarkdownIt) {
md.add_rule::<MyRule1>()
.before::<MyRule2>()
.after::<MyRule3>();
.before_all();
}
For RST, in docutils, they have the rough equivalence (for core rules) of transforms, that specify a priority by which they are sorted: https://docutils.sourceforge.io/docs/ref/transforms.html#transform-priority-range-categories
and, building on this, sphinx then allows transform plugins: https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_transform
It feels this might be an easier way to deal with rule ordering?
Metadata
Metadata
Assignees
Labels
No labels