I am trying to learn how to write markdown rules to implement new bbcode functionality using this guide, however I’m having a really hard time following what is going on as there is so much that is unexplained:
I also checked out the markdown-it documentation, but it is very sparse and seems to mostly be a very high-level overview of the functionality of the system. Some specific question I have:
The guide has this line:
// standard markdown it inline extension goes here.
What is the standard inline extension? Is this where you define the rules that are pushed to the ruler? Why does it return false?
What are the token types? I see examples like
'html_inline'- where do these come from? Is there a static list somewhere of what is available? Can I add new ones? How does the parser know what to do with these?
How does this work? How does the parser know what
'code_inline' does? What does the state.push() function do and how is it intended to be used?
I feel like I’m close to “getting it” but I think I’m missing some concepts. I’ve written the most basic of rules and it appears to be working - I just need a better understanding to move forward. Any help would be appreciated!