CommonMark Renderer
Closed this issue · 15 comments
Is there an accurate CommonMark plugin for TiddlyWiki that exactly matches GitHub rendered pages, inclusive of link syntax, inline code and code block formatting?
no.
Is there a stable js library available?
Yeah
http://strapdownjs.com/
https://github.com/chjj/marked/
and so on
found one: https://github.com/jgm/commonmark.js
@n8sabes did http://tiddlywiki.com/plugins/tiddlywiki/markdown/ not work for you?
@pmario, what about MD formatter for TiddlyWiki Classic?
hmmm, TWc development pretty much stopped at June 2013. The motivation to create new TWc plugins is incredibly low :/
@pmario, Markdown had anomalies making it render differently than GitHub and common plugins for WebStorm and VS Code. As I recall, inline code, code blocks, and a few other things were different enough that it was abandoned.
We install instances of TwiddlyWiki for each project as it's more rich than .md files alone, although VS Code and WebStorm .md plugins are rapidly improving over the last 12 months.
At minimum, it would be nice to have a CommonMark plugin that renders exactly the same as GitHub and IDEs so we can move content between platforms without having to refactor or tweak syntax.
It would be ideal to have an easy way to migrate (or share) content between TiddlyWiki and .md file evironments -- but, that might be too far reaching with the current TiddlyWiki architecture.
..but, that might be too far reaching with the current TiddlyWiki architecture.
not really. It should be relatively straight forward to implement the plugin, since one version already exists. So there is some code to have a look at :)
I had a look at the spec and especially at line break handling. There are 2 versions
Which seem to cause real trouble with many wiki parsers.
GFM actually does the opposite of CommonMark. ...
They do have a terrible hack on the library frontpage to "kind of fix" the misery in the spec :/ ... Scroll down a bit to the "softbreak" handling.
CommonMark seems to inherit the settings from pandocs paragraph handling.
Conclusion
Paragraph and line break handling is a mess. What ever we do it will be wrong for about 50% of the users.
We install instances of TwiddlyWiki for each project as it's more rich than .md files alone, although VS Code and WebStorm .md plugins are rapidly improving over the last 12 months.
That's interesting. ... I think the .md community will gravitate towards CommonMark in the future. ... So I'll reopen the issue. .. I'm interested.
I agree that CommonMark will continue to gain momentum.
BTW, I opened the issue here but see in the readme that TW5 is listed as the current path forward. What is the difference between the projects?
uups. I didn't even notice. ... You are right. We are at the wrong repo here. ... I'll move it over.
hmmm, TWc development pretty much stopped at June 2013.
old, but reliable code. And useful
old, but reliable code. And useful
That's true. I also use some of my first TWCs