Closed somina2 closed 3 years ago
I'm afraid, there are no detailed documentation. Many users already created extensions by reading source codes. You did not possible it due to your code reading skills... Built-in elements like emphasis, links ...etc are implemented by as same interface as extensions. So you just read goldmark source codes to create extensions. See if you can do it, and if it doesn't work, there are some extensions on github, you can search it and read them.
@somina2 here is a small example https://github.com/13rac1/goldmark-hashtag
@somina2 some more that I found usefull were https://github.com/kaleocheng/goldmark-extensions
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
A simple and fun example https://github.com/yuin/goldmark-emoji
do I miss something obvious ?
In the documentation it says: Do you want to add a @username mention syntax to Markdown? You can easily do so in goldmark. You can add your AST nodes, parsers for block-level elements, parsers for inline-level elements, transformers for paragraphs, transformers for the whole AST structure, and renderers.
I just don't understand how ? Been trying to read the source code without success because I don't know the interface. Are there some "hello world" example available?
basically I want to add my own syntax to a markdown document, how do I get access to to the AST nodes ?