tiddlywiki 5.2.1 → 5.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/.eslintignore +5 -12
  2. package/.eslintrc.yml +17 -1
  3. package/.github/workflows/ci.yml +3 -0
  4. package/bin/build-site.sh +1 -1
  5. package/bin/build-tw-org.sh +97 -0
  6. package/boot/boot.js +44 -17
  7. package/boot/bootprefix.js +1 -0
  8. package/contributing.md +1 -1
  9. package/core/copyright.tid +1 -1
  10. package/core/language/en-GB/ControlPanel.multids +3 -1
  11. package/core/language/en-GB/Fields.multids +4 -3
  12. package/core/language/en-GB/Misc.multids +1 -1
  13. package/core/modules/commands/init.js +1 -1
  14. package/core/modules/commands/savelibrarytiddlers.js +1 -1
  15. package/core/modules/commands/savewikifolder.js +1 -1
  16. package/core/modules/deserializers.js +7 -10
  17. package/core/modules/editor/operations/text/wrap-lines.js +5 -3
  18. package/core/modules/filters/crypto.js +27 -0
  19. package/core/modules/filters/insertbefore.js +1 -1
  20. package/core/modules/filters/is/draft.js +2 -2
  21. package/core/modules/filters/listops.js +2 -1
  22. package/core/modules/filters/lookup.js +29 -6
  23. package/core/modules/filters/prefix.js +30 -12
  24. package/core/modules/filters/removeprefix.js +16 -6
  25. package/core/modules/filters/removesuffix.js +20 -6
  26. package/core/modules/filters/search.js +1 -0
  27. package/core/modules/filters/suffix.js +32 -10
  28. package/core/modules/filters/untagged.js +1 -1
  29. package/core/modules/filters.js +4 -2
  30. package/core/modules/parsers/parseutils.js +2 -2
  31. package/core/modules/pluginswitcher.js +1 -1
  32. package/core/modules/savers/gitea.js +2 -2
  33. package/core/modules/savers/github.js +2 -2
  34. package/core/modules/savers/gitlab.js +2 -2
  35. package/core/modules/server/routes/put-tiddler.js +1 -1
  36. package/core/modules/server/server.js +37 -12
  37. package/core/modules/startup/browser-messaging.js +2 -2
  38. package/core/modules/startup/render.js +7 -2
  39. package/core/modules/startup/rootwidget.js +14 -0
  40. package/core/modules/startup/windows.js +22 -9
  41. package/core/modules/tiddler.js +3 -3
  42. package/core/modules/upgraders/plugins.js +1 -1
  43. package/core/modules/utils/crypto.js +2 -2
  44. package/core/modules/utils/dom/dragndrop.js +8 -6
  45. package/core/modules/utils/dom/scroller.js +11 -7
  46. package/core/modules/utils/edition-info.js +1 -5
  47. package/core/modules/utils/pluginmaker.js +2 -4
  48. package/core/modules/widgets/action-listops.js +2 -2
  49. package/core/modules/widgets/button.js +1 -1
  50. package/core/modules/widgets/draggable.js +16 -9
  51. package/core/modules/widgets/eventcatcher.js +34 -30
  52. package/core/modules/widgets/image.js +10 -0
  53. package/core/modules/widgets/importvariables.js +1 -1
  54. package/core/modules/widgets/list.js +3 -0
  55. package/core/modules/widgets/navigator.js +2 -17
  56. package/core/modules/widgets/radio.js +2 -2
  57. package/core/modules/widgets/scrollable.js +11 -9
  58. package/core/modules/widgets/widget.js +30 -14
  59. package/core/modules/wiki-bulkops.js +20 -15
  60. package/core/modules/wiki.js +39 -17
  61. package/core/templates/tiddlywiki5.html.tid +1 -1
  62. package/core/ui/ControlPanel/Cascades/FieldEditor.tid +9 -0
  63. package/core/ui/EditTemplate/body/default.tid +2 -2
  64. package/core/ui/EditTemplate/fieldEditor-default.tid +3 -0
  65. package/core/ui/EditTemplate/fields.tid +6 -4
  66. package/core/ui/EditTemplate/type.tid +1 -1
  67. package/core/ui/EditTemplate.tid +2 -2
  68. package/core/ui/MoreSideBar/plugins/Languages.tid +1 -1
  69. package/core/ui/MoreSideBar/plugins/Plugins.tid +1 -1
  70. package/core/ui/MoreSideBar/plugins/Theme.tid +1 -1
  71. package/core/ui/SideBar/Open.tid +2 -2
  72. package/core/wiki/allfields.tid +1 -1
  73. package/core/wiki/config/FieldEditorFilters.multids +4 -0
  74. package/core/wiki/config/OfficialPluginLibrary.tid +1 -1
  75. package/core/wiki/config/ViewTemplateBodyFilters.multids +2 -1
  76. package/core/wiki/macros/list.tid +2 -2
  77. package/core/wiki/tags/ViewTemplateBodyFilter.tid +1 -1
  78. package/editions/dev/tiddlers/from Heigele and Jurke/Syncadaptor.tid +2 -2
  79. package/editions/dynaviewdemo/tiddlers/SideBar-Open.tid +1 -1
  80. package/editions/fr-FR/output/images/Blurry%20Lawn.jpg +0 -0
  81. package/editions/fr-FR/output/images/Newnham%20Horizon.jpg +0 -0
  82. package/editions/fr-FR/output/index.html +5051 -0
  83. package/editions/fr-FR/output/text/Alice%20in%20Wonderland.tid +3709 -0
  84. package/editions/fr-FR/tiddlers/$ _config_ViewTemplateTitleFilters_fr-default.tid +7 -0
  85. package/editions/fr-FR/tiddlers/$ _core_ui_ViewTemplate_title_fr-default.tid +8 -0
  86. package/editions/fr-FR/tiddlers/$__deprecated.tid +9 -0
  87. package/editions/fr-FR/tiddlers/$__editions_fr-FR_util-macros.tid +1 -0
  88. package/editions/fr-FR/tiddlers/$__editions_tw5.com_doc-macros.tid +69 -5
  89. package/editions/fr-FR/tiddlers/$__editions_tw5.com_version-macros.tid +15 -0
  90. package/editions/fr-FR/tiddlers/$__editions_tw5.com_wikitext-macros.tid +2 -2
  91. package/editions/fr-FR/tiddlers/Block_Quotes_in_WikiText.tid +15 -8
  92. package/editions/fr-FR/tiddlers/CamelCase.tid +6 -3
  93. package/editions/fr-FR/tiddlers/Code Blocks in WikiText.tid +27 -16
  94. package/editions/fr-FR/tiddlers/Community Links Aggregator.tid +11 -0
  95. package/editions/fr-FR/tiddlers/Community.tid +6 -4
  96. package/editions/fr-FR/tiddlers/Creating and editing tiddlers.tid +11 -11
  97. package/editions/fr-FR/tiddlers/Deprecated - What does it mean.tid +17 -0
  98. package/editions/fr-FR/tiddlers/Developers.tid +10 -5
  99. package/editions/fr-FR/tiddlers/Federatial.tid +11 -0
  100. package/editions/fr-FR/tiddlers/Formatting in WikiText.tid +12 -12
  101. package/editions/fr-FR/tiddlers/Forums.tid +27 -13
  102. package/editions/fr-FR/tiddlers/GettingStarted.tid +16 -14
  103. package/editions/fr-FR/tiddlers/Glossaire en-GB -_ fr-FR.tid +3 -1
  104. package/editions/fr-FR/tiddlers/HTML in WikiText.tid +77 -28
  105. package/editions/fr-FR/tiddlers/Headings in WikiText.tid +2 -2
  106. package/editions/fr-FR/tiddlers/HelloThere.tid +15 -12
  107. package/editions/fr-FR/tiddlers/How to export tiddlers.tid +31 -0
  108. package/editions/fr-FR/tiddlers/ImageWidget.tid +33 -0
  109. package/editions/fr-FR/tiddlers/Images in WikiText.tid +69 -0
  110. package/editions/fr-FR/tiddlers/Importing Tiddlers.tid +26 -0
  111. package/editions/fr-FR/tiddlers/JeremyRuston.tid +9 -9
  112. package/editions/fr-FR/tiddlers/Linking in WikiText.tid +108 -19
  113. package/editions/fr-FR/tiddlers/ListField.tid +6 -6
  114. package/editions/fr-FR/tiddlers/Macros in WikiText.tid +5 -5
  115. package/editions/fr-FR/tiddlers/Macros.tid +17 -8
  116. package/editions/fr-FR/tiddlers/PermaLinks.tid +19 -19
  117. package/editions/fr-FR/tiddlers/Philosophy of Tiddlers.tid +2 -2
  118. package/editions/fr-FR/tiddlers/Saving.tid +63 -4
  119. package/editions/fr-FR/tiddlers/Share Plugin.tid +15 -0
  120. package/editions/fr-FR/tiddlers/{Sharing_a_TiddlyWiki_on_Dropbox.tid → Sharing a TiddlyWiki on Dropbox.tid } +12 -4
  121. package/editions/fr-FR/tiddlers/Sharing your tiddlers with others.tid +18 -0
  122. package/editions/fr-FR/tiddlers/Structuring TiddlyWiki.tid +6 -6
  123. package/editions/fr-FR/tiddlers/Styles and Classes in WikiText.tid +11 -10
  124. package/editions/fr-FR/tiddlers/Tagging.tid +24 -18
  125. package/editions/fr-FR/tiddlers/TaskManagementExample.tid +3 -1
  126. package/editions/fr-FR/tiddlers/TiddlerLinks.tid +5 -5
  127. package/editions/fr-FR/tiddlers/TiddlyFox Apocalypse.tid +46 -0
  128. package/editions/fr-FR/tiddlers/TiddlyFox.tid +6 -3
  129. package/editions/fr-FR/tiddlers/TiddlyWiki.tid +6 -4
  130. package/editions/fr-FR/tiddlers/_TiddlyWiki for Scholars_ by Alberto Molina.tid +2 -2
  131. package/editions/prerelease/tiddlers/{Release 5.2.2.tid → Release 5.2.3.tid } +15 -11
  132. package/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid +1 -1
  133. package/editions/prerelease/tiddlers/system/download-empty.tid +1 -0
  134. package/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-horizontal-all.tid +33 -0
  135. package/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-horizontal.tid +43 -0
  136. package/editions/test/tiddlers/tests/data/tabs-macro/expected-html-tabs-vertical.tid +43 -0
  137. package/editions/test/tiddlers/tests/test-action-widgets.js +55 -0
  138. package/editions/test/tiddlers/tests/test-filters.js +225 -64
  139. package/editions/test/tiddlers/tests/test-html-parser.js +15 -0
  140. package/editions/test/tiddlers/tests/test-prefixes-filter.js +5 -5
  141. package/editions/test/tiddlers/tests/test-tags.js +19 -0
  142. package/editions/test/tiddlers/tests/test-utils.js +10 -0
  143. package/editions/test/tiddlers/tests/test-wikitext-parser.js +14 -1
  144. package/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js +86 -0
  145. package/editions/tw.org/tiddlers/$__DefaultTiddlers.tid +6 -0
  146. package/editions/tw.org/tiddlers/$__SiteSubtitle.tid +6 -0
  147. package/editions/tw.org/tiddlers/$__SiteTitle.tid +6 -0
  148. package/editions/tw.org/tiddlers/$__StoryList.tid +3 -0
  149. package/editions/tw.org/tiddlers/$__favicon.ico.png +0 -0
  150. package/editions/tw.org/tiddlers/$__favicon.ico.png.meta +4 -0
  151. package/editions/tw.org/tiddlers/$__palette.tid +6 -0
  152. package/editions/tw.org/tiddlers/$__palettes_BlueFlavour +165 -0
  153. package/editions/tw.org/tiddlers/$__palettes_BlueFlavour.meta +8 -0
  154. package/editions/tw.org/tiddlers/$__palettes_FlowingSun +165 -0
  155. package/editions/tw.org/tiddlers/$__palettes_FlowingSun.meta +8 -0
  156. package/editions/tw.org/tiddlers/$__themes_tiddlywiki_vanilla_metrics_bodyfontsize.tid +6 -0
  157. package/editions/tw.org/tiddlers/$__themes_tiddlywiki_vanilla_metrics_bodylineheight.tid +6 -0
  158. package/editions/tw.org/tiddlers/$__themes_tiddlywiki_vanilla_metrics_sidebarwidth.tid +6 -0
  159. package/editions/tw.org/tiddlers/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid +6 -0
  160. package/editions/tw.org/tiddlers/HelloThere.tid +14 -0
  161. package/editions/tw.org/tiddlers/Table of Contents.tid +11 -0
  162. package/editions/tw.org/tiddlers/TiddlyWiki.tid +8 -0
  163. package/editions/tw.org/tiddlywiki.info +30 -0
  164. package/editions/tw5.com/tiddlers/community/Contributor License Agreement.tid +3 -3
  165. package/editions/tw5.com/tiddlers/community/Forums.tid +16 -13
  166. package/editions/tw5.com/tiddlers/community/Signing the Contributor License Agreement.tid +2 -2
  167. package/editions/tw5.com/tiddlers/community/plugins/TiddlyClip by buggyjay.tid +3 -3
  168. package/editions/tw5.com/tiddlers/concepts/Cascades.tid +1 -0
  169. package/editions/tw5.com/tiddlers/concepts/Customizing EditTemplate Field Rendering.tid +31 -0
  170. package/editions/tw5.com/tiddlers/concepts/Field Editor Cascade.tid +17 -0
  171. package/editions/tw5.com/tiddlers/concepts/Filters.tid +15 -10
  172. package/editions/tw5.com/tiddlers/concepts/Macros.tid +1 -3
  173. package/editions/tw5.com/tiddlers/concepts/Pragma.tid +2 -2
  174. package/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid +2 -1
  175. package/editions/tw5.com/tiddlers/demonstrations/Alice in Wonderland.tid +3707 -4
  176. package/editions/tw5.com/tiddlers/demonstrations/Apple.tid +6 -1
  177. package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/Styles.tid +1 -0
  178. package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/Template.tid +1 -0
  179. package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/TiddlerTemplateFilter.tid +1 -0
  180. package/editions/tw5.com/tiddlers/features/Importing Tiddlers.tid +1 -1
  181. package/editions/tw5.com/tiddlers/features/Modals.tid +2 -1
  182. package/editions/tw5.com/tiddlers/filters/Filter Operators.tid +9 -5
  183. package/editions/tw5.com/tiddlers/filters/all.tid +2 -2
  184. package/editions/tw5.com/tiddlers/filters/butlast.tid +3 -1
  185. package/editions/tw5.com/tiddlers/filters/examples/butlast.tid +4 -3
  186. package/editions/tw5.com/tiddlers/filters/examples/insertbefore Operator (Examples).tid +28 -0
  187. package/editions/tw5.com/tiddlers/filters/examples/lookup Operator (Examples).tid +5 -0
  188. package/editions/tw5.com/tiddlers/filters/examples/prefix.tid +4 -3
  189. package/editions/tw5.com/tiddlers/filters/examples/removeprefix.tid +2 -1
  190. package/editions/tw5.com/tiddlers/filters/examples/removesuffix.tid +2 -3
  191. package/editions/tw5.com/tiddlers/filters/examples/rest.tid +4 -3
  192. package/editions/tw5.com/tiddlers/filters/examples/search.tid +6 -1
  193. package/editions/tw5.com/tiddlers/filters/examples/sortan.tid +5 -1
  194. package/editions/tw5.com/tiddlers/filters/examples/suffix.tid +3 -2
  195. package/editions/tw5.com/tiddlers/filters/insertbefore Operator.tid +21 -5
  196. package/editions/tw5.com/tiddlers/filters/lookup Operator.tid +28 -10
  197. package/editions/tw5.com/tiddlers/filters/prefix.tid +17 -2
  198. package/editions/tw5.com/tiddlers/filters/removeprefix.tid +18 -3
  199. package/editions/tw5.com/tiddlers/filters/removesuffix.tid +18 -3
  200. package/editions/tw5.com/tiddlers/filters/search.tid +10 -9
  201. package/editions/tw5.com/tiddlers/filters/sha256 Operator.tid +18 -0
  202. package/editions/tw5.com/tiddlers/filters/subfilter Operator.tid +2 -2
  203. package/editions/tw5.com/tiddlers/filters/suffix.tid +17 -2
  204. package/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid +2 -2
  205. package/editions/tw5.com/tiddlers/filters/syntax/Named Filter Run Prefix.tid +1 -1
  206. package/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +3 -3
  207. package/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid +4 -14
  208. package/editions/tw5.com/tiddlers/images/New Release Banner.png +0 -0
  209. package/editions/tw5.com/tiddlers/macros/list-links-draggable Macro.tid +1 -1
  210. package/editions/tw5.com/tiddlers/messages/SampleWindowTemplate.tid +2 -2
  211. package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-close-all-windows.tid +20 -0
  212. package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-close-window.tid +39 -0
  213. package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-download-file.tid +6 -1
  214. package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid +16 -12
  215. package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-relink-tiddler.tid +26 -0
  216. package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-rename-tiddler.tid +4 -2
  217. package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-scroll.tid +3 -0
  218. package/editions/tw5.com/tiddlers/plugins/Highlight Plugin.tid +3 -1
  219. package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.21.tid +6 -0
  220. package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.22.tid +6 -0
  221. package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.23.tid +6 -0
  222. package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.0.tid +6 -0
  223. package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.1.tid +6 -0
  224. package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.2.tid +162 -0
  225. package/editions/tw5.com/tiddlers/releasenotes/Releases.tid +4 -2
  226. package/editions/tw5.com/tiddlers/saving/Saving on Browser with the File System Access API.tid +21 -0
  227. package/editions/tw5.com/tiddlers/saving/Saving on TidGi.tid +26 -0
  228. package/editions/tw5.com/tiddlers/saving/Saving via WebDAV.tid +3 -1
  229. package/editions/tw5.com/tiddlers/saving/Saving with Polly.tid +29 -0
  230. package/editions/tw5.com/tiddlers/system/doc-macros.tid +25 -1
  231. package/editions/tw5.com/tiddlers/system/doc-styles.tid +5 -1
  232. package/editions/tw5.com/tiddlers/system/download-empty.tid +1 -0
  233. package/editions/tw5.com/tiddlers/system/operator-macros.tid +4 -2
  234. package/editions/tw5.com/tiddlers/system/operator-template.tid +6 -3
  235. package/editions/tw5.com/tiddlers/system/style-guide-macros.tid +5 -1
  236. package/editions/tw5.com/tiddlers/system/variable-macros.tid +4 -2
  237. package/editions/tw5.com/tiddlers/system/wikitext-macros.tid +17 -3
  238. package/editions/tw5.com/tiddlers/webserver/Using HTTPS.tid +17 -2
  239. package/editions/tw5.com/tiddlers/webserver/WebServer API_ Get All Tiddlers.tid +1 -1
  240. package/editions/tw5.com/tiddlers/webserver/WebServer Authorization.tid +15 -3
  241. package/editions/tw5.com/tiddlers/webserver/WebServer Parameter_ admin.tid +8 -0
  242. package/editions/tw5.com/tiddlers/webserver/WebServer Parameter_ required-plugins.tid +8 -0
  243. package/editions/tw5.com/tiddlers/webserver/WebServer Parameter_ tls-passphrase.tid +10 -0
  244. package/editions/tw5.com/tiddlers/widgets/$__editions_tw5.com_widget-examples_qualify-transcluded.tid +14 -0
  245. package/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid +7 -3
  246. package/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid +1 -1
  247. package/editions/tw5.com/tiddlers/widgets/EventCatcherWidget.tid +7 -6
  248. package/editions/tw5.com/tiddlers/widgets/ImageWidget.tid +9 -1
  249. package/editions/tw5.com/tiddlers/widgets/LinkCatcherWidget.tid +2 -1
  250. package/editions/tw5.com/tiddlers/widgets/MacroCallWidget.tid +3 -1
  251. package/editions/tw5.com/tiddlers/widgets/MessageCatcherWidget.tid +2 -2
  252. package/editions/tw5.com/tiddlers/widgets/QualifyWidget.tid +39 -0
  253. package/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid +7 -6
  254. package/editions/tw5.com/tiddlers/widgets/ViewWidget.tid +26 -8
  255. package/editions/tw5.com/tiddlers/widgets/WikifyWidget.tid +2 -2
  256. package/editions/tw5.com/tiddlers/wikitext/HTML in WikiText.tid +30 -4
  257. package/editions/tw5.com/tiddlers/wikitext/Images in WikiText.tid +3 -3
  258. package/editions/tw5.com/tiddlers/wikitext/Linking in WikiText.tid +44 -1
  259. package/editions/tw5.com/tiddlers/wikitext/Macro Calls in WikiText.tid +3 -3
  260. package/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid +2 -1
  261. package/editions/tw5.com/tiddlers/wikitext/Widgets in WikiText.tid +3 -3
  262. package/editions/tw5.com/tiddlers/wikitext/parser/Block Mode WikiText (Examples).tid +51 -0
  263. package/editions/tw5.com/tiddlers/wikitext/parser/Block Mode WikiText.tid +35 -0
  264. package/editions/tw5.com/tiddlers/wikitext/parser/Inline Mode WikiText.tid +26 -0
  265. package/editions/tw5.com/tiddlers/wikitext/parser/Places where the parser ignores WikiText.tid +14 -0
  266. package/editions/tw5.com/tiddlers/wikitext/parser/WikiText Parser Modes.tid +16 -0
  267. package/editions/tw5.com/tiddlers/wikitext/parser/WikiText parser mode transitions.tid +59 -0
  268. package/editions/tw5.com/tiddlers/wikitext/parser/WikiText parser mode_ HTML examples.tid +72 -0
  269. package/editions/tw5.com/tiddlers/wikitext/parser/WikiText parser mode_ macro examples.tid +55 -0
  270. package/editions/tw5.com/tiddlers/wikitext/parser/WikiText parser mode_ transclusion examples.tid +56 -0
  271. package/editions/tw5.com/tiddlers/wikitext/parser/table-example.tid +8 -0
  272. package/languages/de-DE/ControlPanel.multids +17 -0
  273. package/languages/de-DE/Fields.multids +6 -5
  274. package/languages/de-DE/SideBar.multids +1 -0
  275. package/languages/pl-PL/ControlPanel.multids +15 -2
  276. package/languages/zh-Hans/ControlPanel.multids +2 -0
  277. package/languages/zh-Hans/Fields.multids +4 -2
  278. package/languages/zh-Hans/Misc.multids +1 -1
  279. package/languages/zh-Hant/ControlPanel.multids +2 -0
  280. package/languages/zh-Hant/Fields.multids +4 -2
  281. package/languages/zh-Hant/Misc.multids +1 -1
  282. package/license +1 -1
  283. package/licenses/cla-individual.md +13 -1
  284. package/package.json +5 -3
  285. package/plugins/tiddlywiki/dynannotate/examples/viewtemplate.tid +3 -4
  286. package/plugins/tiddlywiki/highlight/files/default.min.css +9 -0
  287. package/plugins/tiddlywiki/highlight/files/highlight.min.js +1401 -0
  288. package/plugins/tiddlywiki/highlight/files/tiddlywiki.files +2 -2
  289. package/plugins/tiddlywiki/highlight/highlightblock.js +27 -21
  290. package/plugins/tiddlywiki/highlight/plugin.info +1 -1
  291. package/plugins/tiddlywiki/highlight/readme.tid +18 -47
  292. package/plugins/tiddlywiki/highlight/styles.tid +10 -5
  293. package/plugins/tiddlywiki/highlight/usage.tid +48 -1
  294. package/plugins/tiddlywiki/highlight-legacy/TypeMappings.multids +8 -0
  295. package/plugins/tiddlywiki/{highlight → highlight-legacy}/files/default.css +0 -0
  296. package/plugins/tiddlywiki/{highlight → highlight-legacy}/files/highlight.pack.js +0 -0
  297. package/plugins/tiddlywiki/highlight-legacy/files/tiddlywiki.files +22 -0
  298. package/plugins/tiddlywiki/highlight-legacy/highlightblock.js +44 -0
  299. package/plugins/tiddlywiki/highlight-legacy/license.tid +27 -0
  300. package/plugins/tiddlywiki/highlight-legacy/plugin.info +7 -0
  301. package/plugins/tiddlywiki/highlight-legacy/readme.tid +65 -0
  302. package/plugins/tiddlywiki/highlight-legacy/styles.tid +82 -0
  303. package/plugins/tiddlywiki/highlight-legacy/usage.tid +28 -0
  304. package/plugins/tiddlywiki/internals/editpreviews/raw.tid +1 -0
  305. package/plugins/tiddlywiki/markdown/config_renderWikiTextPragma.tid +1 -1
  306. package/plugins/tiddlywiki/markdown/wrapper.js +33 -22
  307. package/plugins/tiddlywiki/menubar/menu.tid +1 -1
  308. package/readme.md +2 -2
  309. package/themes/tiddlywiki/snowwhite/base.tid +2 -1
  310. package/themes/tiddlywiki/vanilla/base.tid +13 -3
  311. package/themes/tiddlywiki/vanilla/sticky.tid +1 -0
  312. package/editions/fr-FR/tiddlers/$__core_ui_ViewTemplate_title.tid +0 -46
  313. package/editions/fr-FR/tiddlers/Images_in_WikiText.tid +0 -48
  314. package/editions/fr-FR/tiddlers/ImportTiddlers.tid +0 -14
  315. package/editions/fr-FR/tiddlers/Sharing_your_tiddlers_with_others.tid +0 -16
  316. package/plugins/tiddlywiki/highlight/howto.tid +0 -10
@@ -1,6 +1,6 @@
1
1
  caption: HTML
2
2
  created: 20131205160816081
3
- modified: 20210614100305329
3
+ modified: 20220123174919252
4
4
  tags: WikiText
5
5
  title: HTML in WikiText
6
6
  type: text/vnd.tiddlywiki
@@ -35,9 +35,11 @@ some text <!-- inline comment -->
35
35
 
36
36
  ! Block mode versus Inline mode
37
37
 
38
- To get the content of an HTML element to be parsed in block mode, the opening tag must be followed by two linebreaks.
38
+ To get the content of an HTML element to be [[parsed|WikiText Parser Modes]] in [[block mode|Block Mode WikiText]], the opening tag must be followed by two linebreaks.
39
39
 
40
- Without the two linebreaks, the tag content will be parsed in inline mode which means that block mode formatting such as wikitext tables, lists and headings is not recognised.
40
+ Without the two linebreaks, the tag content will be [[parsed|WikiText Parser Modes]] in [[inline mode|Inline Mode WikiText]] which means that block mode formatting such as wikitext tables, lists and headings is not recognised.
41
+
42
+ See also [[WikiText parser mode: HTML examples]] and [[WikiText parser mode transitions]].
41
43
 
42
44
  ! Self closing elements
43
45
 
@@ -56,6 +58,26 @@ In an extension of conventional HTML syntax, attributes of elements/widgets can
56
58
  * a transclusion of a [[macro/variable|Macros in WikiText]]
57
59
  * as the result of a [[Filter Expression]]
58
60
 
61
+ !! Style Attributes
62
+
63
+ <<.from-version "5.2.2">> TiddlyWiki supports the usual HTML ''style'' attribute for assigning CSS styles to elements:
64
+
65
+ ```
66
+ <div style="color:red;">Hello</div>
67
+ ```
68
+
69
+ In an extension to HTML, TiddlyWiki also supports accessing individual CSS styles as independent attributes. For example:
70
+
71
+ ```
72
+ <div style.color="red">Hello</div>
73
+ ```
74
+
75
+ The advantage of this syntax is that it simplifies assigning computed values to CSS styles. For example:
76
+
77
+ ```
78
+ <div style.color={{!!color}}>Hello</div>
79
+ ```
80
+
59
81
  !! Literal Attribute Values
60
82
 
61
83
  Literal attribute values can use several different styles of quoting:
@@ -92,6 +114,7 @@ attr={{tiddler}}
92
114
  attr={{!!field}}
93
115
  attr={{tiddler!!field}}
94
116
  ```
117
+ <<.warning "The attribute's value will be the exact text retrieved from the TextReference. Any wiki syntax in that text will be left as-is.">>
95
118
 
96
119
  !! Variable Attribute Values
97
120
 
@@ -102,14 +125,17 @@ Variable attribute values are indicated with double angle brackets around a [[ma
102
125
  ...
103
126
  </div>
104
127
  ```
128
+ <<.warning "The text from the macro's definition will be retrieved and text substitution will be performed (i.e. <<.param $param$>> and <<.param &#36;(...)&#36;>> syntax). The attribute's value will be the resulting text. Any wiki syntax in that text (including further macro calls and variable references) will be left as-is.">>
105
129
 
106
130
  !! Filtered Attribute Values
107
131
 
108
132
  Filtered attribute values are indicated with triple curly braces around a [[Filter Expression]]. The value will be the first item in the resulting list, or the empty string if the list is empty.
109
133
 
134
+ <<.from-version "5.2.2">> To improve readability, newlines can be included anywhere that whitespace is allowed within filtered attributes.
135
+
110
136
  This example shows how to add a prefix to a value:
111
137
 
112
138
  ```
113
139
  <$text text={{{ [<currentTiddler>addprefix[$:/myprefix/]] }}} />
114
140
  ```
115
-
141
+ <<.warning "The attribute's value will be the exact text from the first item in the resulting list. Any wiki syntax in that text will be left as-is.">>
@@ -1,6 +1,6 @@
1
1
  caption: Images
2
2
  created: 20131205160221762
3
- modified: 20210519160846733
3
+ modified: 20220129152627668
4
4
  tags: WikiText [[Working with TiddlyWiki]]
5
5
  title: Images in WikiText
6
6
  type: text/vnd.tiddlywiki
@@ -14,7 +14,7 @@ Images can be included in WikiText with the following syntax:
14
14
  [img[https://tiddlywiki.com/favicon.ico]]
15
15
  ```
16
16
 
17
- You can also insert images from the editor toolbar. Click ''picture'' (<<.icon $:/core/images/picture>>) and select a picture file.
17
+ You can also insert image tiddlers from the editor toolbar. Click ''picture'' (<<.icon $:/core/images/picture>>) and select a picture file.
18
18
 
19
19
  If the image source is the title of an image tiddler then that tiddler is directly displayed. Otherwise it is interpreted as a URL and an HTML `<img>` tag is generated with the `src` attribute containing the URL.
20
20
 
@@ -63,6 +63,6 @@ Renders as:
63
63
  ! Importing Images
64
64
 
65
65
  Use the <<.button import>> button (under the <<.sidebar-tab Tools>> tab in the sidebar), or drag and drop.
66
- See [[ImportingTiddlers]] for details.
66
+ See [[Importing Tiddlers]] for details.
67
67
 
68
68
  <<.from-version "5.2.0">> You can also import images by dropping or pasting images into the tiddler editor.
@@ -1,6 +1,6 @@
1
1
  caption: Linking
2
2
  created: 20131205155230596
3
- modified: 20160607095245257
3
+ modified: 20211230145939554
4
4
  tags: WikiText
5
5
  title: Linking in WikiText
6
6
  type: text/vnd.tiddlywiki
@@ -80,3 +80,46 @@ You can also use the extended syntax to force an external link:
80
80
 
81
81
  See the LinkWidget for details of the underlying widget used to implement tiddler links, including macros that can be used to customise its behaviour.
82
82
 
83
+ ! Generating dynamic links
84
+
85
+ [[Linking in WikiText]] does not lend itself well to creating dynamic links. The reason is because this WikiText link:
86
+
87
+ ```
88
+ [[link to myself|Linking in WikiText]]
89
+ ```
90
+ is shorthand for using the LinkWidget and TextWidget like this:
91
+
92
+ ```
93
+ <$link to="Linking in WikiText">
94
+ <$text text="link to myself"/>
95
+ </$link>
96
+ ```
97
+ Since both the link title ("link to myself") and the link target ("Linking in ~WikiText") are used as widget attributes, no WikiText expansion takes place.
98
+
99
+ For example, an attempt to use a [[reference|TextReference]] and a [[variable|Variables]] to dynamically generate a link like this:
100
+
101
+ <<.bad-example "`[[{{!!caption}}|<<currentTiddler>>]]`">>
102
+
103
+ is the same as trying to use the LinkWidget and TextWidget like this:
104
+
105
+ <<.bad-example """```
106
+ <$link to="<<currentTiddler>>">
107
+ <$text text="{{!!caption}}"/>
108
+ </$link>
109
+ ```""">>
110
+
111
+ This will not work as desired. Content inside of quoted widget attributes is [[treated as a literal value|HTML in WikiText]] and protected from WikiText expansion, so it will render like this:
112
+
113
+ <<.bad-example "[[{{!!caption}}|<<currentTiddler>>]]">>
114
+
115
+ In order to get the desired result, the LinkWidget can be used directly like this:
116
+
117
+ <<wikitext-example-without-html src:"<$link to=<<currentTiddler>>>{{!!caption}}</$link>">>
118
+
119
+ See also another example of [[constructing dynamic links|Concatenating text and variables using macro substitution]].
120
+
121
+ ! Linking within tiddlers - "anchor links"
122
+
123
+ In TiddlyWiki anchor links can help us link to target points and distinct sections within rendered tiddlers. They can help the reader navigate longer tiddler content.
124
+
125
+ See [[Anchor Links using HTML]] for more information.
@@ -1,9 +1,9 @@
1
+ caption: Macro Calls
1
2
  created: 20150220182252000
2
- modified: 20150221221340000
3
+ modified: 20220122193853161
3
4
  tags: WikiText
4
5
  title: Macro Calls in WikiText
5
6
  type: text/vnd.tiddlywiki
6
- caption: Macro Calls
7
7
 
8
8
  To call a [[macro|Macros]], place `<<`double angle brackets`>>` around the name and any parameter values.
9
9
 
@@ -19,7 +19,7 @@ The syntax is actually a shorthand for a <<.wlink MacroCallWidget>> widget. The
19
19
 
20
20
  As macros are simply parameterised [[variables|Variables]], a variable's value can be inserted using the same techniques.
21
21
 
22
- [[Examples|Macro Calls in WikiText (Examples)]]
22
+ [[Examples|Macro Calls in WikiText (Examples)]] and [[more examples|WikiText parser mode: macro examples]]
23
23
 
24
24
  !! Named vs.unnamed parameters
25
25
 
@@ -1,6 +1,6 @@
1
1
  caption: Transclusion
2
2
  created: 20131205160146648
3
- modified: 20150220161347000
3
+ modified: 20220122193352028
4
4
  tags: WikiText
5
5
  title: Transclusion in WikiText
6
6
  type: text/vnd.tiddlywiki
@@ -48,3 +48,4 @@ See also:
48
48
  * TemplateTiddlers
49
49
  * TranscludeWidget
50
50
  * [[Transclusion and Substitution]]
51
+ * [[WikiText parser mode: transclusion examples]]
@@ -1,6 +1,6 @@
1
1
  caption: Widgets
2
2
  created: 20131205160840915
3
- modified: 20161020210726813
3
+ modified: 20220122193129241
4
4
  tags: WikiText
5
5
  title: Widgets in WikiText
6
6
  type: text/vnd.tiddlywiki
@@ -20,8 +20,8 @@ Note that widgets inherit all the features of [[HTML in WikiText]]:
20
20
  ** Macro invocations (eg `attr=<<myMacro>>`)
21
21
  ** Transclusions (eg, `attr={{MyTiddler!!field}}`)
22
22
  ** Filtered transclusions (eg, `attr={{{ [filter[op]] }}}`)
23
- * The content of a widget is parsed in inline mode unless the opening tag is followed by two linebreaks, which forces block mode
24
- ** 'Inline mode' means that 'block mode' parse rules like headings, tables and lists are not recognised
23
+ * The content of a widget is [[parsed|WikiText Parser Modes]] in [[inline mode|Inline Mode WikiText]] unless the opening tag is followed by two linebreaks, which forces [[block mode|Block Mode WikiText]]
24
+ ** [[inline mode|Inline Mode WikiText]] means that [[block mode|Block Mode WikiText]] parse rules like headings, tables and lists are not recognised
25
25
 
26
26
  See [[HTML in WikiText]] for more details.
27
27
 
@@ -0,0 +1,51 @@
1
+ created: 20220115152811251
2
+ modified: 20220115161035903
3
+ tags: [[Block Mode WikiText]]
4
+ title: Block Mode WikiText (Examples)
5
+ type: text/vnd.tiddlywiki
6
+
7
+ [[Paragraphs|Paragraphs in WikiText]] are the most common WikiText. It is important to know they do not end until a blank line is encountered. Once a paragraph starts the parser will be in ''inline mode''. Until that blank line is encountered other ''block mode'' syntax will be ignored:
8
+
9
+ <<<
10
+ <<wikitext-example-without-html src:'This is a paragraph.
11
+ Only __//inline mode//__ punctuation is recognised here.
12
+ Block mode punctuation will be <b>ignored</b> until
13
+ the paragraph ends (i.e. a blank line is encountered).
14
+ For example:
15
+ * List item punctuation is ignored
16
+ * So is this horizontal rule:
17
+ ---
18
+ |tables|are|ignored|
19
+ ! headings are ignored
20
+ <<<
21
+ multi-line block quotes are ignored
22
+ <<<
23
+ '>>
24
+ <<<
25
+
26
+ To get the parser to recognise the above ''block mode'' WikiText, a blank line needs to be inserted after the "For example:" line. The blank line will be treated as the end of the paragraph and the parser will start recognising ''block mode'' punctuation again. Like this:
27
+
28
+ <<<
29
+ <<wikitext-example-without-html src:'This is a paragraph.
30
+ Only __//inline mode//__ punctuation is recognised here.
31
+ Block mode punctuation will be <b>ignored</b> until
32
+ the paragraph ends (i.e. a blank line is encountered).
33
+ For example, here is a blank line:
34
+
35
+ * due to above blank line,
36
+ * list items work
37
+ * the following horizontal rule also works:
38
+ ---
39
+ |!tables|!work|
40
+ |cell 1| cell 2|
41
+ ! Headings work
42
+ <<<
43
+ multi-line block quotes work
44
+ <<<
45
+ ; Term
46
+ : Definition of that term
47
+ Another paragraph can start here, but it will not end until blank line
48
+ '>>
49
+ <<<
50
+
51
+ All the block mode examples above except for the paragraph are written one line after the other without blanks between. Those types of WikiText don't require the extra blank line to terminate.
@@ -0,0 +1,35 @@
1
+ caption: block parser mode
2
+ created: 20220110234234616
3
+ modified: 20220122182842032
4
+ tags: [[WikiText Parser Modes]]
5
+ title: Block Mode WikiText
6
+ type: text/vnd.tiddlywiki
7
+
8
+ Some WikiText is recognised only while the parser is in block mode.
9
+
10
+ Common characteristics of such block mode WikiText:
11
+
12
+ * At least one entire line is required to delimit the WikiText.
13
+ * The closing punctuation must come at the end of the line (in some cases the end of the line //is// the closing punctuation.
14
+
15
+ |!~WikiText|!Punctuation|
16
+ |[[Block Quotes in WikiText]] |Multi-line block quotes are enclosed by lines containing only the text `<<<`; single line block quotes are also possible.|
17
+ |[[Code Blocks in WikiText]]|Enclosed by lines containing only the text <code>&#96;&#96;&#96;</code>|
18
+ |[[Definitions in WikiText]]|Each term is on its own line and each definition is on its own line.|
19
+ |[[Hard Linebreaks in WikiText]]|Enclosed by lines containing only the text `"""`.|
20
+ |[[Headings in WikiText]]|Entire line starting with `!`.|
21
+ |[[Horizontal Rules in WikiText]]|A line containing only the text `---`.|
22
+ |[[Lists in WikiText]]|Each list item is on its own line.|
23
+ |[[Paragraphs in WikiText]]|Any text other than the start punctuation of one of the other block mode WikiText will start a paragraph. Even the start punctuation of inline mode WikiText will start a paragraph. The parser includes all following lines into the paragraph until it encounters a blank line.|
24
+ |[[Styles and Classes in WikiText]]|Enclosed by lines starting with `@@`.|
25
+ |[[Tables in WikiText]]|Each table row is a line starting and ending with `|`.|
26
+ |[[Typed Blocks in WikiText]]|Enclosed by lines starting with `$$`.|
27
+
28
+ The above WikiText types are only recognised in ''block mode''. However, the text <<.em enclosed>> by most of them will be parsed in ''inline mode'' ([[Block Quotes in WikiText]] and [[Styles and Classes in WikiText]] are the two exceptions in which the parser will continue in ''block mode''). While in ''inline mode'' the parser may encounter something which moves it to ''block mode'' (see [[WikiText parser mode transitions]]).
29
+
30
+ At the end of the terminating line, the parser will return to ''block mode''.
31
+ <<.tip 'Note: [[Hard Linebreaks in WikiText]] require an extra blank line after the trailing `"""` before the parser will return to <b>block mode</b>'>>.
32
+
33
+ If the punctuation for the above types of WikiText is encountered while the parser is in ''inline mode'', it will be //ignored// and output as-is.
34
+
35
+ [[Examples|Block Mode WikiText (Examples)]]
@@ -0,0 +1,26 @@
1
+ caption: inline parser mode
2
+ created: 20220111000108618
3
+ modified: 20220122182842036
4
+ tags: [[WikiText Parser Modes]]
5
+ title: Inline Mode WikiText
6
+ type: text/vnd.tiddlywiki
7
+
8
+ Some WikiText is recognised only while the parser is in inline mode.
9
+
10
+ These WikiText types can be expressed without an entire line of text. They aren't required to be all on one line, just that they <<.em can>> be expressed within a single line. And as such, more than one can appear within a single line. In other words, line endings are not involved while the parser tries to find where the particular WikiText begins and ends While the parser is in inline mode, it will recognise the punctuation for these WikiText types:
11
+
12
+ * [[Dashes in WikiText]]
13
+ * [[Formatting in WikiText]]
14
+ * [[HTML in WikiText]]
15
+ * [[Images in WikiText]]
16
+ * [[Linking in WikiText]]
17
+ * [[Macro Calls in WikiText]]
18
+ * [[Styles and Classes in WikiText]] (single line version only)
19
+ * [[Transclusion in WikiText]]
20
+ * [[Variables in WikiText]]
21
+ * [[Widgets in WikiText]]
22
+
23
+ <<.tip """[[Macro Calls in WikiText]] and [[Transclusion in WikiText]] will be recognised in block mode if the macro call or transclusion spans an entire line.""">>
24
+ <<.tip """The other ''inline mode'' WikiText types are technically <<.em only>> detected while the parser is in ''inline mode''. However, the opening punctuation will also trigger the start of [[Paragraphs in WikiText]] which will automatically cause the parser to go into ''inline mode''. Therefore, practically speaking, it is just as useful to consider these WikiText types as recognised while the parser is in either ''inline mode'' or ''block mode''""">>
25
+
26
+ While processing the //enclosed// text of some of these WikiText types, the parser [[will not look for new WikiText|Places where the parser ignores WikiText]]. But for rest of these WikiText types, the parser will continue in ''inline mode'' for the //enclosed// text. While parsing that text, it might encounter something which [[moves it to block mode|WikiText parser mode transitions]].
@@ -0,0 +1,14 @@
1
+ caption: ignore parser mode
2
+ created: 20220111000929700
3
+ modified: 20220122182842038
4
+ tags: [[WikiText Parser Modes]]
5
+ title: Places where the parser ignores WikiText
6
+ type: text/vnd.tiddlywiki
7
+
8
+ Text enclosed by these constructs is skipped by the parser and WikiText punctuation will be ignored:
9
+
10
+ |[[Code Blocks in WikiText]]|One of the main purposes of code blocks is to suppress wikitext expansion. Once the code block starts, the parser will ignore all WikiText punctuation until the code block ends.|
11
+ |[[Images in WikiText]]|`[[img|literal image link text]]` - the text enclosed by square braces will be ignored. This means, for example, [[transclusions|Transclusion in WikiText]] and [[macro calls|Macro Calls in WikiText]] cannot be used to dynamically construct the link text|
12
+ |[[Linking in WikiText]]|`[[literal link target|literal link text]]` - the text enclosed by square braces will be ignored. This means, for example, [[transclusions|Transclusion in WikiText]] and [[macro calls|Macro Calls in WikiText]] cannot be used to dynamically construct the link target or the link text|
13
+ |[[Macro Calls in WikiText]]|`<<mymacro ''notbold'' "literal text" "<<macro_expansion_ignored>>" {{transclusion_ignored}}>>` - while processing the text enclosed by a macro call, the parser will follow special rules for detecting macro parameters. These rules do not include detection of WikiText. However, after the parameters are substituted into the macro definition, the result will be parsed using [[normal rules|Wiki Text Parser Modes]]. This will likely result in the detection of any WikiText.|
14
+
@@ -0,0 +1,16 @@
1
+ created: 20220110233944530
2
+ modified: 20220202022415581
3
+ tags: WikiText
4
+ title: WikiText Parser Modes
5
+ type: text/vnd.tiddlywiki
6
+
7
+ In order to display Tiddlers (usually the text field), the WikiText parser reads and interprets the content and applies WikiText rules. The parser has three modes:
8
+
9
+ * ''pragma mode'' - the parser will recognise only [[pragma mode WikiText|Pragma]] punctuation
10
+ * ''block mode'' - the parser will recognise only [[block mode WikiText|Block Mode WikiText]] punctuation
11
+ * ''inline mode'' - the parser will recognise only [[inline mode WikiText|Inline Mode WikiText]]
12
+
13
+ The parser [[transitions between these modes|WikiText parser mode transitions]] based on the text it encounters. In addition, there are [[places where the parser ignores WikiText|Places where the parser ignores WikiText]] punctuation.
14
+
15
+ <<.tip "The concept of inline vs block also exists for standard HTML elements. For HTML, these [[two layout modes|https://www.w3schools.com/html/html_blocks.asp]] determine if the output flows together on the same line or not.
16
+ <p>Most [[block mode WikiText|Block Mode WikiText]] corresponds to [[block level HTML elements|https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements]] and most [[inline mode WikiText|Inline Mode WikiText]] corresponds to [[inline level HTML elements|https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements]]. However, for Wikitext the two modes are just as important for determining which syntax will be recognised by the parser as they are for determining how the output will flow.</p>">>
@@ -0,0 +1,59 @@
1
+ created: 20220110235808139
2
+ modified: 20220122184232928
3
+ tags: [[WikiText Parser Modes]]
4
+ title: WikiText parser mode transitions
5
+ type: text/vnd.tiddlywiki
6
+
7
+ This is a <<.em rough>> diagram whose lines mostly correspond to the parser mode transitions described below:
8
+ <$railroad text="""
9
+ {<"pragma mode">
10
+ {(
11
+ {<"inline mode"> +} |
12
+ ({<"block mode">
13
+ +("<<<" | "@@" | "$$")
14
+ }
15
+ "other block mode start punct")
16
+ {<"inline mode"> +}
17
+ )
18
+ +(
19
+ "block mode close punctuation" |
20
+ ("blank line" "html open tag")
21
+ )}
22
+ +("transclude widget" | "macrocall")
23
+ }
24
+ """/>
25
+
26
+ !! Start mode
27
+
28
+ By default the parser starts in [[block mode|Block Mode WikiText]]. However, a tiddler can instead be transcluded with [[inline mode|Inline Mode WikiText]] in which case [[block mode WikiText|Block Mode WikiText]] will not be recognised.
29
+
30
+ At the start of text only, the parser will also recognise any [[pragma mode WikiText|Pragma]].
31
+
32
+ !! Transitions from pragma mode
33
+
34
+ At the start of text, the parser will recognise any [[pragma|Pragma]]. If none are found then it will move to [[inline|Inline Mode WikiText]] or [[block|Block Mode WikiText]] mode depending on the transclusion mode. If any [[pragma|Pragma]] are found then it will continue looking for [[pragma|Pragma]] until it finds one or more blank lines not followed by the start of a new pragma.
35
+
36
+ !! Transitions from block mode
37
+
38
+ When the parser encounters most [[block mode|Block Mode WikiText]] start punctuation it transitions to [[inline mode|Inline Mode WikiText]]. This means
39
+ he text enclosed by most [[block mode|Block Mode WikiText]] constructs will be parsed using [[inline mode|Inline Mode WikiText]].
40
+
41
+ <<.tip """The start "punctuation" for a paragraph is "invisible". Even for paragraphs the parser moves to [[inline mode|Inline Mode WikiText]]""">>
42
+
43
+ However, there are a few constructs whose enclosed text is parsed using [[block mode|Block Mode WikiText]]:
44
+
45
+ * [[Multi-line block quotes|Block Quotes in WikiText]]
46
+ * [[Multi-line style blocks|Styles and Classes in WikiText]]
47
+ * [[Typed blocks|Typed Blocks in WikiText]]
48
+
49
+ When the start punctuation for these are encountered, the enclosed text will continue to be parsed in [[block mode|Block Mode WikiText]].
50
+
51
+ [[Horizontal rules|Horizontal Rules in WikiText]] are another special case. They do not enclose any text, so there is no opportunity for the parser to transition to [[inline mode|Inline Mode WikiText]].
52
+
53
+ Opening [[widget|Widgets in WikiText]] or [[HTML|HTML in WikiText]] tags provide another way the parser can transition. When such a tag is <<.em not>> followed by a blank line, then the contents enclosed by the tag will be parsed in [[inline mode|Inline Mode WikiText]]. See the [[HTML examples|WikiText parser mode: HTML examples]].
54
+
55
+ !! Transitions from inline mode
56
+
57
+ * The parser will move back to [[block mode|Block Mode WikiText]] after the end of a line which terminates [[block mode|Block Mode WikiText]] ~WikiText. In other words, when the block mode close punctuation is encountered.
58
+ * When the opening [[widget|Widgets in WikiText]] or [[HTML|HTML in WikiText]] tag is followed by a blank line, then the contents enclosed by the tag will be parsed in [[block mode|Block Mode WikiText]]. See the [[HTML examples|WikiText parser mode: HTML examples]].
59
+ * Transcluded text and text pulled in via a macro call can transition the parser away from [[inline mode|Inline Mode WikiText]]. See [[transclusion examples|WikiText parser mode: transclusion examples]] and [[macro examples|WikiText parser mode: macro examples]] for more details.
@@ -0,0 +1,72 @@
1
+ created: 20220122153235162
2
+ modified: 20220122180508134
3
+ tags: [[WikiText parser mode transitions]]
4
+ title: WikiText parser mode: HTML examples
5
+ type: text/vnd.tiddlywiki
6
+
7
+ <<wikitext-example-without-html "<div>
8
+
9
+ * blank line after open tag allows
10
+ * block mode punctuation (i.e. this list) to
11
+ * be recognised
12
+ </div>
13
+ ">>
14
+
15
+ ---
16
+
17
+ The open tag blank line "trick" also works inside of punctuation only recognised in inline mode (such as [[Formatting in WikiText]]):
18
+
19
+ <<wikitext-example-without-html "''<div>
20
+
21
+ * list item one
22
+ * list item two
23
+ </div>''">>
24
+
25
+ ---
26
+
27
+ <<wikitext-example-without-html "<div>
28
+ * Open tag without a blank line means
29
+ * block mode punctuation (i.e. this list) will
30
+ * NOT be recognised.
31
+
32
+ Paragraphs are only recognised in block mode. Even with blank lines, new paragraphs are not recognised.
33
+
34
+ This also is not a new paragraph.
35
+ </div>">>
36
+
37
+ ---
38
+
39
+ [[Tables in WikiText]] is one construct for which the open tag blank line "trick" cannot work. In order for the parser to recognise a table row, the entire row must be on a single line.
40
+
41
+ Adding a blank link after an open tag within a table cell causes the row to span mulitple lines and the parser ceases to be able to recognise it as a table row.
42
+
43
+ <<wikitext-example-without-html "|table row|all on|one line|is recognised|">>
44
+
45
+ <<wikitext-example-without-html "|For a blank line after open tag|<div>
46
+
47
+ * list is recognised
48
+ * but the surrounding table row is not
49
+ </div>|">>
50
+
51
+ ---
52
+
53
+ The only way to get [[block mode|Block Mode WikiText]] punctuation recognised in [[wikitext tables|Tables in WikiText]] is to use <<.wlink TranscludeWidget>> with <<.attr mode>> = <<.value block>>.
54
+
55
+ <<wikitext-example-without-html '|Nested table:|<$transclude tiddler="table-example" mode=block/>|'>>
56
+
57
+ Note that <<.wlink MacroCallWidget>> does not have a similar <<.attr mode>> attribute and the content of macro definitions can only be parsed in [[inline mode|Inline Mode WikiText]]
58
+
59
+ ---
60
+
61
+ The less convenient `<table>`, `<tr>`, `<td>` html tags can be used as a foolproof way to get [[block mode|Block Mode WikiText]] punctuation recognised inside of table cells.
62
+
63
+ <<wikitext-example-without-html "<table>
64
+ <tr><td>
65
+
66
+ * list item one
67
+ * list item two
68
+ </td><td>
69
+
70
+ |nested|table|
71
+ </td></tr>
72
+ </table>">>
@@ -0,0 +1,55 @@
1
+ created: 20220122144742419
2
+ modified: 20220122180929683
3
+ tags: [[WikiText parser mode transitions]]
4
+ title: WikiText parser mode: macro examples
5
+ type: text/vnd.tiddlywiki
6
+
7
+ \define boringtable()
8
+ |cell one|cell two|
9
+ |cell three|cell four|
10
+ \end
11
+ With the macro `boringtable` defined as:
12
+ <$codeblock code=<<boringtable>>/>
13
+ then
14
+ <table><<wikitext-example-table-header>><tbody>
15
+ <<wikitext-example-table-row 1 "* <<boringtable>>">>
16
+ <<wikitext-example-table-row 2 """* <div>
17
+
18
+ <<boringtable>>
19
+ </div>
20
+ """>>
21
+ <<wikitext-example-table-row 3 "* <$macrocall $name=boringtable/>">>
22
+ <<wikitext-example-table-row 4 "* <$macrocall $name=boringtable></$macrocall>">>
23
+ <<wikitext-example-table-row 5 """* <$macrocall $name=boringtable>
24
+
25
+ </$macrocall>""">>
26
+ </tbody></table>
27
+
28
+ The list syntax is recognised in [[block mode|Block Mode WikiText]] and the enclosed contents are parsed using [[inline mode|Inline Mode WikiText]]. When the parser encounters a [[wikitext macro call|Macro Calls in WikiText]] it will use the current parse mode to parse the contents of the macro. The contents of the macro contains table syntax which is only recognised in [[block mode|Block Mode WikiText]].
29
+
30
+ Therefore, in #1 above the table syntax is not recognised. In #2 above, the blank line after the open `div` tag moves the parser back into [[block mode|Block Mode WikiText]], the macro call inherits it and the table is recognised.
31
+
32
+ When calling macros using the [[widget|MacroCallWidget]], the parse mode will be inline (#3 and #4 above) unless it is written as an open tag with a following blank line (#5 above).
33
+
34
+ <<.tip "See also [[WikiText parser mode: transclusion examples]] for similar examples">>
35
+
36
+ ---
37
+
38
+ These examples have slightly different behavior. In the previous section, the macro calls were enclosed within list items. In these examples, the macro calls are at the top level:
39
+ <table><<wikitext-example-table-header>><tbody>
40
+ <<wikitext-example-table-row 1 "<<boringtable>>">>
41
+ <<wikitext-example-table-row 2 """<div>
42
+
43
+ <<boringtable>>
44
+ </div>
45
+ """>>
46
+ <<wikitext-example-table-row 3 "<$macrocall $name=boringtable/>">>
47
+ <<wikitext-example-table-row 4 "<$macrocall $name=boringtable></$macrocall>">>
48
+ <<wikitext-example-table-row 5 """<$macrocall $name=boringtable>
49
+
50
+ </$macrocall>""">>
51
+ </tbody></table>
52
+
53
+ Of these examples, only the two <<.wlink MacroCallWidget>> tags which are not followed by a blank line are parsed using [[inline mode|Inline Mode WikiText]].
54
+
55
+ <<.tip "See also [[WikiText parser mode: transclusion examples]] for similar examples">>
@@ -0,0 +1,56 @@
1
+ created: 20220122145022547
2
+ modified: 20220122180845946
3
+ tags: [[WikiText parser mode transitions]]
4
+ title: WikiText parser mode: transclusion examples
5
+ type: text/vnd.tiddlywiki
6
+
7
+
8
+ Given the tiddler [[table-example]] defined with these contents:
9
+ <$codeblock code={{table-example}}/>
10
+ then
11
+ <table><<wikitext-example-table-header>><tbody>
12
+ <<wikitext-example-table-row 1 "* {{table-example}}">>
13
+ <<wikitext-example-table-row 2 """* <div>
14
+
15
+ {{table-example}}
16
+ </div>
17
+ """>>
18
+ <<wikitext-example-table-row 3 "* <$transclude tiddler=table-example/>">>
19
+ <<wikitext-example-table-row 4 "* <$transclude tiddler=table-example></$transclude>">>
20
+ <<wikitext-example-table-row 5 """* <$transclude tiddler=table-example>
21
+
22
+ </$transclude>""">>
23
+ <<wikitext-example-table-row 6 "* <$transclude tiddler=table-example mode=block/>">>
24
+ </tbody></table>
25
+
26
+ The list syntax is recognised in [[block mode|Block Mode WikiText]] and the enclosed contents are parsed using [[inline mode|Inline Mode WikiText]]. When the parser encounters a [[wikitext transclusion|Transclusion in WikiText]] it will use the current parse mode to parse the contents of the transcluded tiddler. The contents of the example tiddler contains table syntax which is only recognised in [[block mode|Block Mode WikiText]].
27
+
28
+ Therefore, in #1 above the table syntax is not recognised. In #2 above, the blank line after the open `div` tag moves the parser back into [[block mode|Block Mode WikiText]], the transcluded text inherits it and the table is recognised.
29
+
30
+ When transcluding tiddlers using the [[widget|TranscludeWidget]], the parse mode will be inline (#3 and #4 above) unless it is written as an open tag with a following blank line (#5 above).
31
+
32
+ <<.tip "See also [[WikiText parser mode: macro examples]] for similar examples. The only difference here is <<.wlink TranscludeWidget>> has a <<.attr mode>> attribute (extra example #6) which allows the parse mode to be explicitly overridden rather than come implicitly based on the they way the tag is written">>
33
+
34
+ ---
35
+
36
+ In these examples, the transclusions are at the top level instead of enclosed in list items:
37
+
38
+ <table><<wikitext-example-table-header>><tbody>
39
+ <<wikitext-example-table-row 1 "{{table-example}}">>
40
+ <<wikitext-example-table-row 2 """<div>
41
+
42
+ {{table-example}}
43
+ </div>
44
+ """>>
45
+ <<wikitext-example-table-row 3 "<$transclude tiddler=table-example/>">>
46
+ <<wikitext-example-table-row 4 "<$transclude tiddler=table-example></$transclude>">>
47
+ <<wikitext-example-table-row 5 """<$transclude tiddler=table-example>
48
+
49
+ </$transclude>""">>
50
+ <<wikitext-example-table-row 6 "<$transclude tiddler=table-example mode=inline/>">>
51
+ </tbody></table>
52
+
53
+
54
+ Of these examples, only the two <<.wlink TranscludeWidget>> tags which are not followed by a blank line and the widget call using <<.attr mode>>=<<.value inline>> are parsed using [[inline mode|Inline Mode WikiText]].
55
+
56
+ <<.tip "See also [[WikiText parser mode: macro examples]] for similar examples">>
@@ -0,0 +1,8 @@
1
+ created: 20220118023452157
2
+ modified: 20220118023529825
3
+ tags: [[WikiText parser mode transitions (Examples)]]
4
+ title: table-example
5
+ type: text/vnd.tiddlywiki
6
+
7
+ |cell one|cell two|
8
+ |cell three|cell four|