TiddlyWiki5/plugins/tiddlywiki
lin onetwo 20d6be1e23
feat: serialize AST node back to wikitext string (#8258)
* refactor: extract a new $tw.wiki.getParser

* feat: allow $tw.utils.getParseTreeText to render other rules' text

* feat: two example getText handler

* Revert "feat: allow $tw.utils.getParseTreeText to render other rules' text"

This reverts commit 8a12498fa9.

* refactor: keep original getParseTreeText not touched

* refactor: use serialize in rules

* refactor: $tw.utils.extend({},options) -> options || {}

* Update codeinline.js

* Create test-wikitext-serialize.js

* DEBUG: only run my tests for development, remove before PR merge

* lint: if

* feat: add rule: 'parseBlock' metadata

* feat: handle tailing \n that may be missing

* feat: allow recursive

* feat: generate more rule and tests

* feat: generate more rule and tests

* fix: remove pragma:true, otherwise following text will become children of it

* fix: condition manually

Deekseek is silly

* fix: some test

* fix: some test

* feat: $tw.utils.serializeAttribute

* fix: use "" for string param

* feat: list

* refactor: ' -> "

* fix: parsemode don't have node

* fix: render invisible comment and parsemode as data element

* feat: add void: true, in ast node to prevent render

* feat: use void widget, so methods always return a widget

* feat: ast to use new widget type void

* test: add rule: 'parseBlock' and isRuleEnd: true

* lint: quote

* Update widget.js

* fix: void node need to handle its children

* Update test-wikitext-parser.js

* lint: quote

* Update void.js

* Update test-wikitext-parser.js

* fix: macrodef with comment (void node) not working

* lint: ' -> "

* feat: add to styleblock

* feat: styleblock

* feat: styleinline

* Update table.js

* lint: useless comments

* feat: transcludeblock

* refactor: reuse block on inline when possible

* feat: use void node to carry important info for typedblock

* feat: run all tests

* lint: useless ai generated comments

* Update conditional.js to not include space

* Update test-wikitext-serialize.js

* Update conditional.js

* refactor: move tiddlers to /data

* refactor: no need for new $tw.Wiki()

* lint: double quote

* refactor: lowercase the parseblock rule name

* fix: Wiki parser initialize blockRuleClasses only when first new an instance

* feat: restore inline macro def

* fix: macro in widget param

* fix: positional attribute in macro call

* fix: table space and horizrule block new line

* feat: make sure block rule all have \n\n for visiblity

* lint: function param

* fix: empty list item

* feat: add \n\n based on isBlock, if could also be inline

* fix: conditional without elseif

* refactor: use isBlock in macrodef to know inline or block

* fix: link may not have attribute and children

* DEBUG: render result and diff below body only on browser

DEBUG: render result below body only on browser

DEBUG: render result below body

DEBUG: fix build

DEBUG: show render result as ViewTemplate

* fix: remove pad space in />

* test: remove pad space in />

* Revert DEBUG: render result and diff below body only on browser

* refactor: fold commentText variable

* refactor: fold long comment

* fix: double quotes for parameter values

* Update void.js

* refactor: move all exports.serialize = function(tree,serialize) { to plugin

* fix: expost listTypes from core, and require it in plugin

* refactor: move serializeWikitextParseTree to plugin and init it

* refactor: move serializeAttribute util also to the plugin

* fix: Delete unused file

* Update macrodef.js

* Update test-wikitext-parser.js

* lint: fix

* Update plugins/tiddlywiki/wikitext-serialize/rules/filteredtranscludeblock.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update core/modules/widgets/void.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update plugins/tiddlywiki/wikitext-serialize/rules/list.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update plugins/tiddlywiki/wikitext-serialize/rules/list.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update plugins/tiddlywiki/wikitext-serialize/rules/styleblock.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unused methods from VoidNodeWidget

Deleted render, execute, and refresh methods from VoidNodeWidget as they are no longer needed. The widget now only inherits from the base Widget class and exports the constructor.

* docs: about regex in styleinline.js

* Update parsetree.js

* Update core/modules/widgets/void.js

Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>

* feat: Ensure at least one space after the style/class

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
2025-10-29 21:21:36 +00:00
..
async Add plugin stability badges (#8198) 2024-05-21 11:22:39 +01:00
aws Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
bibtex Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
browser-sniff Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
browser-storage Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
classictools Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
codemirror Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-autocomplete Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-closebrackets Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-closetag Add plugin stability badges (#8198) 2024-05-21 11:22:39 +01:00
codemirror-fullscreen-editing Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-keymap-emacs Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-keymap-sublime-text Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-keymap-vim Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-mode-css Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-mode-htmlembedded Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-mode-htmlmixed Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-mode-javascript Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-mode-markdown Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-mode-x-tiddlywiki Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-mode-xml Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-search-replace Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
codemirror-trailingspace Bump codemirror 5 plugin version to 5.65.19 (#9114) 2025-06-28 16:18:42 +01:00
comments Use currentColor to style svg (#9316) 2025-10-07 11:55:26 +01:00
confetti Change experimental plugins to stable 2025-05-18 12:04:08 +01:00
consent-banner Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
dynannotate Fix bug exposed by #9030 2025-04-14 22:17:18 +01:00
dynaview Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
evernote Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
external-attachments Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
filesystem Further improvements for offloading server components (#9288) 2025-09-14 11:21:42 +01:00
freelinks Aho-Corasick Freelinks Enhancement for Large Wikis and Non-Latin Titles (#9084) 2025-10-29 17:41:35 +00:00
geospatial Change experimental plugins to stable 2025-05-18 12:04:08 +01:00
github-fork-ribbon Fix github fork ribbon plugin marked as deprecated & add it back to full edition. (#8656) 2024-10-02 12:42:49 +01:00
googleanalytics [5.4.0] Update eslint target to 2017 and do initial fixes (#9135) 2025-10-01 15:08:00 +01:00
help Update PageControls buttons to use v5.3.2 syntax (#8579) 2024-09-10 12:00:13 +01:00
highlight [5.4.0] Update highlightjs plugin (#9118) 2025-10-29 11:04:53 +00:00
innerwiki Remove function wrappers from plugins (#9030) 2025-04-14 18:28:04 +01:00
internals Add plugin stability badges (#8198) 2024-05-21 11:22:39 +01:00
jasmine Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
jszip Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
katex Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
markdown Markdown: Fix missing inline support and macrocall args parsing error (#9295) 2025-10-10 13:31:11 +01:00
markdown-legacy Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
menubar Use currentColor to style svg (#9316) 2025-10-07 11:55:26 +01:00
pluginlibrary Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
powered-by-tiddlywiki Add plugin stability badges (#8198) 2024-05-21 11:22:39 +01:00
qrcode Remove function wrappers from plugins (#9030) 2025-04-14 18:28:04 +01:00
railroad Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
savetrail Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
sax Add plugin stability badges (#8198) 2024-05-21 11:22:39 +01:00
share Fix some download file types. (#9026) 2025-04-12 15:32:10 +01:00
stacked-view Change experimental plugins to stable 2025-05-18 12:04:08 +01:00
text-slicer Use currentColor to style svg (#9316) 2025-10-07 11:55:26 +01:00
tiddlyweb [v5.4.0] Offload server components from browser builds of TiddlyWiki (#9183) 2025-09-12 15:21:34 +01:00
tour Use currentColor to style svg (#9316) 2025-10-07 11:55:26 +01:00
translators Translator editon update (#8703) 2024-10-29 12:07:12 +00:00
tw2parser Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
tw5.com-docs Change experimental plugins to stable 2025-05-18 12:04:08 +01:00
twitter Remove module function wrapper and add matching configurations for dprint and eslint (#7596) 2025-03-21 17:22:57 +00:00
twitter-archivist [5.4.0] Update eslint target to 2017 and do initial fixes (#9135) 2025-10-01 15:08:00 +01:00
upgrade Use currentColor to style svg (#9316) 2025-10-07 11:55:26 +01:00
wikitext-serialize feat: serialize AST node back to wikitext string (#8258) 2025-10-29 21:21:36 +00:00
xlsx-utils [5.4.0] Update eslint target to 2017 and do initial fixes (#9135) 2025-10-01 15:08:00 +01:00
xmldom Add plugin stability badges (#8198) 2024-05-21 11:22:39 +01:00