mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 20:10:03 +00:00
13faeaa0bd
* Markdown: Let WikiText parsing handle the creation of LaTeX widgets. When embedding LaTeX snippets in inline HTML nodes, such as TiddlyRemember macros or HTML tables, the parsing of latex nodes breaks the WikiText by splitting it into pieces around the latex node. This commit fixes the issue by converting the Remarkable katex nodes back to text, using a newline to indicate a block katex snippet. This is then re-parsed by the WikiText KaTeX plugin. TESTED: Created a test wiki with: ``` $ node tiddlywiki.js test --init markdowndemo $ node tiddlywiki.js test --listen ``` * Verified markdown + KaTeX support still works as expected. * Verified that embedding LaTeX snippets in inline HTML works (e.g. `<a href="https://example.com/">$x^2$</a>`). * Verified the markdown + KaTeX support works as expected with renderWikiText set to `false`. * Style: Remove spaces between if and opening parentheses. |
||
---|---|---|
.. | ||
EditorToolbar | ||
files | ||
images | ||
config_breaks.tid | ||
config_linkify.tid | ||
config_linkNewWindow.tid | ||
config_quotes.tid | ||
config_renderWikiText.tid | ||
config_renderWikiTextPragma.tid | ||
config_typographer.tid | ||
docs_type_markdown.tid | ||
new-markdown.tid | ||
plugin.info | ||
readme.tid | ||
usage.tid | ||
wrapper.js |
title: $:/plugins/tiddlywiki/markdown/readme This is a TiddlyWiki plugin for parsing Markdown text, using the [[Remarkable|https://github.com/jonschlinkert/remarkable]] library. If the KaTeX TiddlyWiki plugin is installed, KaTeX support is enabled using the [[remarkable-katex|https://github.com/bradhowes/remarkable-katex]] Remarkable plugin. It is completely self-contained, and doesn't need an Internet connection in order to work. It works both in the browser and under Node.js. [[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/markdown]]