1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00
TiddlyWiki5/plugins/tiddlywiki
RJ Skerry-Ryan 13faeaa0bd
Markdown: Let WikiText parsing handle the creation of LaTeX widgets. (#6428)
* 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.
2022-01-30 11:23:00 +00:00
..
async Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
aws AWS Plugin: Add aws-encodeuricomponent filter that also encodes single quotes 2020-09-23 17:32:38 +01:00
bibtex BibTeX Plugin: Force fieldnames to be lowercase 2021-04-07 17:43:41 +01:00
blog Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
browser-sniff Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
browser-storage Browser-storage: Fix startup constraints 2020-08-11 12:32:39 +01:00
cecily Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
classictools Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
codemirror Fix for CodeMirror issues with drop events in Chrome 96 (#6278) 2021-11-28 14:46:27 +00:00
codemirror-autocomplete Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-closebrackets Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-closetag Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-fullscreen-editing Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-emacs Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-sublime-text Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-vim Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-css Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-htmlembedded Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-htmlmixed Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-javascript Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-markdown Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-x-tiddlywiki Introduce "parent-plugin" field to control how plugins are displayed in the chooser 2019-09-25 16:16:28 +01:00
codemirror-mode-xml Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-search-replace Update CodeMirror to 5.58.3 - fix vim-mode cursor invisible (#5172) 2020-12-01 18:11:40 +00:00
comments Replace various &nbsp; with tc-small-gap classes (#4926) 2020-10-28 13:13:55 +00:00
consent-banner Consent widget 2020-07-13 11:49:21 +01:00
d3 Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
dynannotate Dynannotate: Fix off-by-one error for end of annotation text 2020-12-09 19:14:43 +00:00
dynaview Dynaview: Fix transclude-when-visible macro 2020-09-23 17:33:00 +01:00
evernote Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
external-attachments Fix external-attachments plugin relative path bug 2020-10-26 18:36:46 +00:00
filesystem Revert "Update sync methods (#5467)" 2021-07-05 19:26:20 +01:00
freelinks Simplify freelinks regexp 2021-09-14 10:22:27 +01:00
github-fork-ribbon Merge branch 'tiddlywiki-com' 2020-04-15 16:03:38 +01:00
googleanalytics Add new "Consent Banner" plugin, and update Google Analytics plugin to use it 2020-06-22 11:31:54 +01:00
hammerjs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
help Fix broken filters introduced in b179a6011 2020-02-29 15:56:22 +00:00
highlight Remove 2 whitespaces (#6434) 2022-01-30 11:07:32 +00:00
innerwiki Fix bug with innerwiki template 2021-10-02 16:17:07 +01:00
internals ViewTemplateBodyCascade: Add support for code-body field 2021-12-09 20:47:51 +00:00
jasmine Fix browser testing (#5254) 2020-12-11 10:12:01 +00:00
jszip JSZip plugin: Fix example formatting 2020-10-19 09:44:55 +01:00
katex katex-plugin: fix #6041 add automatic numbering reset to KaTex style-sheet (#6046) 2021-09-18 09:45:17 +01:00
markdown Markdown: Let WikiText parsing handle the creation of LaTeX widgets. (#6428) 2022-01-30 11:23:00 +00:00
menubar Menubar plugin: Add optional dropdown-position 2021-03-08 17:47:04 +00:00
mobiledragdrop Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
nodewebkitsaver Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
pluginlibrary Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
powered-by-tiddlywiki Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
qrcode Fix: add text to QR Code button caption (#6082) 2021-10-02 18:09:11 +01:00
railroad Use this.wiki where applicable (#4601) 2020-05-06 11:27:50 +01:00
savetrail Revert "Update sync methods (#5467)" 2021-07-05 19:26:20 +01:00
sax Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
share Adds $tw.utils.decodeURISafe and $tw.utils.decodeURIComponentSafe (#5999) 2021-08-29 13:39:32 +01:00
stacked-view Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
tahoelafs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
text-slicer Fix ViewToolbar items inconsistent spacing (#5473) 2021-05-24 19:24:37 +01:00
tiddlyweb Revert some of the UI changes for downloading external-js 2021-09-12 10:48:17 +01:00
translators Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
tw2parser Use this.wiki where applicable (#4601) 2020-05-06 11:27:50 +01:00
tw5.com-docs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
twitter Twitter Plugin: Add warning if the wiki needs to be saved and reloaded 2020-04-21 21:22:13 +01:00
upgrade Disable autosave in the upgrade wizard 2020-10-26 17:28:57 +00:00
xlsx-utils Xlsx-utils: Fix crash when using deserializer 2021-01-16 15:37:50 +00:00
xmldom Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00