anstosa / tw5-markdown

Comprehensive Markdown plugin for TiddlyWiki
http://demo.santosa.family/#tw5-markdown
26 stars 8 forks source link

Macro shorthand doesn't work #5

Open iilyak opened 6 years ago

iilyak commented 6 years ago

I am trying to combine tw5 syntax and markdown syntax in a single tiddler. According to documentation all non markdown syntax elements fallback to tw5 parser. Most likely I am doing something stupid and the syntax I try to use is colliding with markdown. I have a tiddler with the following content:

<<now>>

It renders as <.

anstosa commented 6 years ago

Ah, yeah the verbose macro syntax works (<$macrocall $name=now>): image

The plugin uses MarkdownIt to parse from Markdown to HTML and then uses a custom function to parse from HTML to a TW Widget tree. Because the <<>> shorthand is not valid xml, it doesn't survive the initial Markdown rendering to get to the stage where the TW fallback logic lives.

I should be able to add a custom MarkdownIt plugin in order to make the macro shorthand work. I will re-purpose this ticket for that