This is a sample implementation of a basic extension. It uses the @types/markdown-it
package from NPM which contains the documentation for markdown-it
. The code here is mostly copied from the backtick
rule implementation you can find in the original markdown-it
repository.
Plugin example for markdown-it, extension tutorial, markdown-it extension API, TypeScript, jsDoc, documentation for extensions, specification of plugin API, how to write an extension for markdown-it.
I'm studying a way to make a similar but very simplified replacement process for the Liquid used in Jekyll, where when finding a declaration {{variable}} it is consulted in the application's database, so I would have {{doc.variable} } for database variables, and {{sys.variable}} for internal system variables.
In your case you used a single character delimiter, could you help me with an example for a two character delimiter? or if there is already something ready that I can replicate?
I'm using NativeScript and I don't know yet if it will be possible to use Markdown-it with it, but I'll try.
Grateful.