Move to markdownit ruler will allow to enable/disable rules when starting a new parse, it makes flexibility and behavior like the native markdownit rules.
For example, I want to push some bbcode rules but not enable them by default, then enable them when I need them (like the example on the OP). Currently, this is not possible with the custom Ruler, maybe can do that with some tricky (through the parse env or modify the rules of ruler manually)?
not wrapping inside the bar should not tokenize
wrap inside the bar should be tokenized
The reason why I’m not creating native markdownit rules other than using the bbcode is implementing rules like bbcode will be difficult and hard to maintain, and bbcode is already here.
Great job, but my use case is something different.
And I like your code here which inspires me on the other concern problems.