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,7 +1,7 @@
1
1
  {
2
2
  "tiddlers": [
3
3
  {
4
- "file": "highlight.pack.js",
4
+ "file": "highlight.min.js",
5
5
  "fields": {
6
6
  "type": "application/javascript",
7
7
  "title": "$:/plugins/tiddlywiki/highlight/highlight.js",
@@ -11,7 +11,7 @@
11
11
  "suffix": "\nexports.hljs = hljs;\n"
12
12
  },
13
13
  {
14
- "file": "default.css",
14
+ "file": "default.min.css",
15
15
  "fields": {
16
16
  "type": "text/css",
17
17
  "title": "$:/plugins/tiddlywiki/highlight/highlight.css",
@@ -18,28 +18,34 @@ var CodeBlockWidget = require("$:/core/modules/widgets/codeblock.js").codeblock;
18
18
 
19
19
  var hljs = require("$:/plugins/tiddlywiki/highlight/highlight.js");
20
20
 
21
- hljs.configure({tabReplace: " "});
22
-
23
- CodeBlockWidget.prototype.postRender = function() {
24
- var domNode = this.domNodes[0],
25
- language = this.language,
26
- tiddler = this.wiki.getTiddler(TYPE_MAPPINGS_BASE + language);
27
- if(tiddler) {
28
- language = tiddler.fields.text || "";
29
- }
30
- if(language && hljs.getLanguage(language)) {
31
- domNode.className = language.toLowerCase() + " hljs";
32
- if($tw.browser && !domNode.isTiddlyWikiFakeDom) {
33
- hljs.highlightBlock(domNode);
34
- } else {
35
- var text = domNode.textContent;
36
- domNode.children[0].innerHTML = hljs.fixMarkup(hljs.highlight(language,text).value);
37
- // If we're using the fakedom then specially save the original raw text
38
- if(domNode.isTiddlyWikiFakeDom) {
39
- domNode.children[0].textInnerHTML = text;
21
+ if(hljs.getLanguage !== undefined) {
22
+ // load language definitions
23
+ $tw.utils.each($tw.modules.types["highlight"],function(moduleInfo,moduleName) {
24
+ $tw.utils.evalSandboxed(moduleInfo.definition,{hljs:hljs, exports:{}},moduleName);
25
+ });
26
+
27
+ CodeBlockWidget.prototype.postRender = function() {
28
+ var domNode = this.domNodes[0],
29
+ language = this.language,
30
+ tiddler = this.wiki.getTiddler(TYPE_MAPPINGS_BASE + language);
31
+ if(tiddler) {
32
+ language = tiddler.fields.text || "";
33
+ }
34
+ if(language && hljs.getLanguage(language)) {
35
+ domNode.className = "hljs";
36
+ domNode.children[0].className = language.toLowerCase() + " hljs";
37
+ if($tw.browser && !domNode.isTiddlyWikiFakeDom) {
38
+ hljs.highlightElement(domNode.children[0]);
39
+ } else {
40
+ var text = domNode.textContent;
41
+ domNode.children[0].innerHTML = hljs.highlight(text,{language: language, ignoreIllegals: true}).value;
42
+ // If we're using the fakedom then specially save the original raw text
43
+ if(domNode.isTiddlyWikiFakeDom) {
44
+ domNode.children[0].textInnerHTML = text;
45
+ }
40
46
  }
41
47
  }
42
- }
43
- };
48
+ };
49
+ }
44
50
 
45
51
  })();
@@ -3,5 +3,5 @@
3
3
  "name": "Highlight",
4
4
  "description": "Highlight.js syntax highlighting",
5
5
  "author": "Joao Bolila",
6
- "list": "readme usage howto license"
6
+ "list": "readme usage license"
7
7
  }
@@ -1,51 +1,21 @@
1
1
  title: $:/plugins/tiddlywiki/highlight/readme
2
2
 
3
- This plugin provides syntax highlighting of code blocks using v9.18.1 of [[highlight.js|https://github.com/isagalaev/highlight.js]] from Ivan Sagalaev.
3
+ \define highlightVersion() 11.4.0
4
4
 
5
- ! Usage
6
-
7
- When the plugin is installed it automatically applies highlighting to all codeblocks defined with triple backticks or with the CodeBlockWidget.
8
-
9
- The language can optionally be specified after the opening triple braces:
10
-
11
- <$codeblock code="""```css
12
- * { margin: 0; padding: 0; } /* micro reset */
13
-
14
- html { font-size: 62.5%; }
15
- body { font-size: 14px; font-size: 1.4rem; } /* =14px */
16
- h1 { font-size: 24px; font-size: 2.4rem; } /* =24px */
17
- ```"""/>
18
-
19
- If no language is specified highlight.js will attempt to automatically detect the language.
5
+ This plugin provides syntax highlighting of code blocks using version <<highlightVersion>> of [[highlight.js|https://github.com/isagalaev/highlight.js]] from Ivan Sagalaev. This plugin does not work on browsers that do not fully support ~JavaScript ES6 (2015). If you need highlight.js running on those legacy browsers, you would need to install the "Highlight (Legacy)" plugin instead. Here's a [[ES6 compatibility table|https://caniuse.com/?search=es6]].
20
6
 
21
7
  ! Built-in Language Brushes
22
8
 
23
- The plugin includes support for the following languages (referred to as "brushes" by highlight.js):
9
+ The plugin includes support for the following common languages (referred to as "brushes" by highlight.js):
24
10
 
25
- * apache
26
- * arduino
27
- * arm assembly
28
- * asciidoc
29
- * autohotkey
30
- * awk
31
11
  * bash
32
- * cmake
33
- * coffeescript
12
+ * c
34
13
  * cpp
35
- * cs
14
+ * csharp
36
15
  * css
37
16
  * diff
38
- * dockerfile
39
- * erlang
40
- * elixir
41
- * fortran
42
17
  * go
43
- * gradle
44
- * haskell
45
- * html
46
- * http
47
- * ini
48
- * intel x86 assembly
18
+ * html, xml
49
19
  * java
50
20
  * javascript
51
21
  * json
@@ -54,28 +24,29 @@ The plugin includes support for the following languages (referred to as "brushes
54
24
  * lua
55
25
  * makefile
56
26
  * markdown
57
- * mathematica
58
- * matlab
59
- * nginx
60
27
  * objectivec
61
28
  * perl
62
29
  * php
63
30
  * plaintext
64
- * powershell
65
- * properties
66
31
  * python
67
32
  * R
68
33
  * ruby
69
34
  * rust
70
35
  * scss
71
- * shell session
72
36
  * sql
37
+ * shell session
73
38
  * swift
74
- * toml
39
+ * toml, ini
75
40
  * typescript
76
- * vala
77
- * vim script
78
- * xml
41
+ * visual basic .net
79
42
  * yaml
80
43
 
81
- You can also specify the language as a MIME content type (eg `text/html` or `text/css`). The mapping is accomplished via mapping tiddlers whose titles start with `$:/config/HighlightPlugin/TypeMappings/`.
44
+ And these additional ones:
45
+
46
+ * apache config
47
+ * dockerfile
48
+ * fortran
49
+ * latex
50
+ * nginx config
51
+
52
+ The mapping between a MIME type and a highlight.js language specifier is accomplished via mapping tiddlers whose titles start with `$:/config/HighlightPlugin/TypeMappings/`.
@@ -1,13 +1,18 @@
1
1
  title: $:/plugins/tiddlywiki/highlight/styles
2
2
  tags: [[$:/tags/Stylesheet]]
3
3
 
4
- .hljs {
5
- display: block;
6
- overflow-x: auto;
4
+ pre.hljs {
5
+ padding: 0;
6
+ }
7
+
8
+ pre code.hljs {
7
9
  padding: 0.5em;
10
+ }
11
+
12
+ .hljs {
8
13
  background: <<colour tiddler-editor-background>>;
9
14
  color: <<colour foreground>>;
10
- -webkit-text-size-adjust:none
15
+ -webkit-text-size-adjust:none;
11
16
  }
12
17
 
13
18
  .hljs-comment,
@@ -25,7 +30,7 @@ tags: [[$:/tags/Stylesheet]]
25
30
  /* Solarized Cyan */
26
31
  .hljs-number,
27
32
  .hljs-string,
28
- .hljs-meta .hljs-meta-string,
33
+ .hljs-meta .hljs-string,
29
34
  .hljs-literal,
30
35
  .hljs-doctag,
31
36
  .hljs-regexp {
@@ -1,16 +1,63 @@
1
1
  title: $:/plugins/tiddlywiki/highlight/usage
2
2
 
3
+ \import $:/plugins/tiddlywiki/highlight/readme
4
+
5
+ \define jsDelivrLink() https://www.jsdelivr.com/package/gh/highlightjs/cdn-release?path=build%2Flanguages&version=$(highlightVersion)$
6
+ \define unpkgLink() https://unpkg.com/browse/@highlightjs/cdn-assets@$(highlightVersion)$/languages/
7
+
3
8
  ! Usage
4
9
 
5
- Fenced code blocks can have a language specifier added to trigger highlighting in a specific language. Otherwise heuristics are used to detect the language.
10
+ Syntax highlighting is triggered when you add language information to code blocks defined with triple backticks or with the `<$codeblock>` widget. For fenced code blocks, specify the code's language immediately after the first set of backticks:
6
11
 
7
12
  ```
8
13
  ```js
9
14
  var a = b + c; // Highlighted as JavaScript
10
15
  ```
11
16
  ```
17
+
12
18
  ! Adding Themes
13
19
 
14
20
  You can add themes from highlight.js by copying the CSS to a new tiddler and tagging it with [[$:/tags/Stylesheet]]. The available themes can be found on GitHub:
15
21
 
16
22
  https://github.com/isagalaev/highlight.js/tree/master/src/styles
23
+
24
+ ! Supporting Additional Languages
25
+
26
+ The [[highlight.js|https://github.com/highlightjs/highlight.js]] project supports many languages. Only a subset of these languages are supported by the plugin. You can change the language set using either of the following methods:
27
+
28
+ !! Browser-based Method
29
+
30
+ You can import language definitions into <$text text="JavaScript"/> tiddlers, with their `module-type` set to "highlight".
31
+
32
+ First, locate the language file(s) you need. You can fetch the files from the following CDNs:
33
+
34
+ * <a href=<<jsDelivrLink>>>jsDelivr</a>
35
+ * <a href=<<unpkgLink>>>unpkg</a>
36
+
37
+ Then, click the button below to create a "highlight" module. Copy and paste the content of a language file into the the text area. Give your tiddler a meaningful title so you can keep track of the languages you've installed. You may choose to either create one tiddler per language or lump all language definitions into one tiddler. Save and reload your wiki.
38
+
39
+ <$button tooltip="add new languages" aria-label="add new languages" >
40
+ <$action-createtiddler $basetitle="highlight-language.js" text="" type="application/javascript" module-type="highlight">
41
+ <$action-sendmessage $message="tm-edit-tiddler" $param=<<createTiddler-title>>/>
42
+ </$action-createtiddler>
43
+ Add New Language(s)
44
+ </$button>
45
+
46
+ !!! Keeping Your Language Definitions Up-to-date
47
+
48
+ Remember to update installed languages whenever this plugin is upgraded:
49
+
50
+ <ul>
51
+ <$list filter="[[highlight]modules[]]" emptyMessage="""<li>(none installed)</li>""">
52
+ <li><$link><<currentTiddler>></$link></li>
53
+ </$list>
54
+ </ul>
55
+
56
+ !! Via <$text text="TiddlyWiki"/> on Node.js
57
+
58
+ You can replace the supplied highlight.js library with a custom version:
59
+
60
+ # Go to the highlight.js project [[download page|https://highlightjs.org/download/]], select the language definitions to include, and press the Download button to download a zip archive containing customised support files for a highlight.js syntax highlighting server.
61
+ # Locate the `highlight.min.js` file in the highlight plugin -- on a stock Debian 8 system running Tiddlywiki5 under node-js, it is in `/usr/local/lib/node_modules/tiddlywiki/plugins/tiddlywiki/highlight/files/`.
62
+ # Replace the plugin `highlight.min.js` file located in step 2 with the one from the downloaded archive obtained in step 1.
63
+ # Restart the ~TiddlyWiki server.
@@ -0,0 +1,8 @@
1
+ title: $:/config/HighlightPlugin/TypeMappings/
2
+
3
+ application/javascript: javascript
4
+ application/json: json
5
+ text/css: css
6
+ text/html: html
7
+ image/svg+xml: xml
8
+ text/x-markdown: markdown
@@ -0,0 +1,22 @@
1
+ {
2
+ "tiddlers": [
3
+ {
4
+ "file": "highlight.pack.js",
5
+ "fields": {
6
+ "type": "application/javascript",
7
+ "title": "$:/plugins/tiddlywiki/highlight-legacy/highlight.js",
8
+ "module-type": "library"
9
+ },
10
+ "prefix": "var hljs = require(\"$:/plugins/tiddlywiki/highlight-legacy/highlight.js\");\n",
11
+ "suffix": "\nexports.hljs = hljs;\n"
12
+ },
13
+ {
14
+ "file": "default.css",
15
+ "fields": {
16
+ "type": "text/css",
17
+ "title": "$:/plugins/tiddlywiki/highlight-legacy/highlight.css",
18
+ "tags": "[[$:/tags/Stylesheet]]"
19
+ }
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,44 @@
1
+ /*\
2
+ title: $:/plugins/tiddlywiki/highlight-legacy/highlightblock.js
3
+ type: application/javascript
4
+ module-type: widget
5
+
6
+ Wraps up the fenced code blocks parser for highlight and use in TiddlyWiki5
7
+
8
+ \*/
9
+ (function() {
10
+
11
+ /*jslint node: true, browser: true */
12
+ /*global $tw: false */
13
+ "use strict";
14
+ var TYPE_MAPPINGS_BASE = "$:/config/HighlightPlugin/TypeMappings/";
15
+
16
+ var CodeBlockWidget = require("$:/core/modules/widgets/codeblock.js").codeblock;
17
+
18
+ var hljs = require("$:/plugins/tiddlywiki/highlight-legacy/highlight.js");
19
+
20
+ hljs.configure({tabReplace: " "});
21
+
22
+ CodeBlockWidget.prototype.postRender = function() {
23
+ var domNode = this.domNodes[0],
24
+ language = this.language,
25
+ tiddler = this.wiki.getTiddler(TYPE_MAPPINGS_BASE + language);
26
+ if(tiddler) {
27
+ language = tiddler.fields.text || "";
28
+ }
29
+ if(language && hljs.getLanguage(language)) {
30
+ domNode.className = language.toLowerCase() + " hljs";
31
+ if($tw.browser && !domNode.isTiddlyWikiFakeDom) {
32
+ hljs.highlightBlock(domNode);
33
+ } else {
34
+ var text = domNode.textContent;
35
+ domNode.children[0].innerHTML = hljs.fixMarkup(hljs.highlight(language,text).value);
36
+ // If we're using the fakedom then specially save the original raw text
37
+ if(domNode.isTiddlyWikiFakeDom) {
38
+ domNode.children[0].textInnerHTML = text;
39
+ }
40
+ }
41
+ }
42
+ };
43
+
44
+ })();
@@ -0,0 +1,27 @@
1
+ title: $:/plugins/tiddlywiki/highlight-legacy/license
2
+ type: text/plain
3
+
4
+ Copyright (c) 2006, Ivan Sagalaev
5
+ All rights reserved.
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright
10
+ notice, this list of conditions and the following disclaimer.
11
+ * Redistributions in binary form must reproduce the above copyright
12
+ notice, this list of conditions and the following disclaimer in the
13
+ documentation and/or other materials provided with the distribution.
14
+ * Neither the name of highlight.js nor the names of its contributors
15
+ may be used to endorse or promote products derived from this software
16
+ without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
19
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
22
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,7 @@
1
+ {
2
+ "title": "$:/plugins/tiddlywiki/highlight-legacy",
3
+ "name": "Highlight (Legacy)",
4
+ "description": "Highlight.js syntax highlighting for legacy browsers",
5
+ "author": "Joao Bolila",
6
+ "list": "readme usage license"
7
+ }
@@ -0,0 +1,65 @@
1
+ title: $:/plugins/tiddlywiki/highlight-legacy/readme
2
+
3
+ This plugin provides syntax highlighting of code blocks using v9.18.1 of [[highlight.js|https://github.com/isagalaev/highlight.js]] from Ivan Sagalaev. This legacy version should be installed in place of the regular Highlight plugin when you require your wiki to be opened in browsers that do not fully support <$text text="JavaScript"/> ES6 (2015). Here's a [[ES6 compatibility table|https://caniuse.com/?search=es6]].
4
+
5
+ ! Built-in Language Brushes
6
+
7
+ The plugin includes support for the following languages (referred to as "brushes" by highlight.js):
8
+
9
+ * apache
10
+ * arduino
11
+ * arm assembly
12
+ * asciidoc
13
+ * autohotkey
14
+ * awk
15
+ * bash
16
+ * cmake
17
+ * coffeescript
18
+ * cpp
19
+ * cs
20
+ * css
21
+ * diff
22
+ * dockerfile
23
+ * erlang
24
+ * elixir
25
+ * fortran
26
+ * go
27
+ * gradle
28
+ * haskell
29
+ * html
30
+ * http
31
+ * ini
32
+ * intel x86 assembly
33
+ * java
34
+ * javascript
35
+ * json
36
+ * kotlin
37
+ * less
38
+ * lua
39
+ * makefile
40
+ * markdown
41
+ * mathematica
42
+ * matlab
43
+ * nginx
44
+ * objectivec
45
+ * perl
46
+ * php
47
+ * plaintext
48
+ * powershell
49
+ * properties
50
+ * python
51
+ * R
52
+ * ruby
53
+ * rust
54
+ * scss
55
+ * shell session
56
+ * sql
57
+ * swift
58
+ * toml
59
+ * typescript
60
+ * vala
61
+ * vim script
62
+ * xml
63
+ * yaml
64
+
65
+ The mapping between a MIME type and a highlight.js language specifier is accomplished via mapping tiddlers whose titles start with `$:/config/HighlightPlugin/TypeMappings/`.
@@ -0,0 +1,82 @@
1
+ title: $:/plugins/tiddlywiki/highlight-legacy/styles
2
+ tags: [[$:/tags/Stylesheet]]
3
+
4
+ .hljs {
5
+ display: block;
6
+ overflow-x: auto;
7
+ padding: 0.5em;
8
+ background: <<colour tiddler-editor-background>>;
9
+ color: <<colour foreground>>;
10
+ -webkit-text-size-adjust:none
11
+ }
12
+
13
+ .hljs-comment,
14
+ .hljs-quote {
15
+ color: #93a1a1;
16
+ }
17
+
18
+ /* Solarized Green */
19
+ .hljs-keyword,
20
+ .hljs-selector-tag,
21
+ .hljs-addition {
22
+ color: #859900;
23
+ }
24
+
25
+ /* Solarized Cyan */
26
+ .hljs-number,
27
+ .hljs-string,
28
+ .hljs-meta .hljs-meta-string,
29
+ .hljs-literal,
30
+ .hljs-doctag,
31
+ .hljs-regexp {
32
+ color: #2aa198;
33
+ }
34
+
35
+ /* Solarized Blue */
36
+ .hljs-title,
37
+ .hljs-section,
38
+ .hljs-name,
39
+ .hljs-selector-id,
40
+ .hljs-selector-class {
41
+ color: #268bd2;
42
+ }
43
+
44
+ /* Solarized Yellow */
45
+ .hljs-attribute,
46
+ .hljs-attr,
47
+ .hljs-variable,
48
+ .hljs-template-variable,
49
+ .hljs-class .hljs-title,
50
+ .hljs-type {
51
+ color: #b58900;
52
+ }
53
+
54
+ /* Solarized Orange */
55
+ .hljs-symbol,
56
+ .hljs-bullet,
57
+ .hljs-subst,
58
+ .hljs-meta,
59
+ .hljs-meta .hljs-keyword,
60
+ .hljs-selector-attr,
61
+ .hljs-selector-pseudo,
62
+ .hljs-link {
63
+ color: #cb4b16;
64
+ }
65
+
66
+ /* Solarized Red */
67
+ .hljs-built_in,
68
+ .hljs-deletion {
69
+ color: #dc322f;
70
+ }
71
+
72
+ .hljs-formula {
73
+ background: #eee8d5;
74
+ }
75
+
76
+ .hljs-emphasis {
77
+ font-style: italic;
78
+ }
79
+
80
+ .hljs-strong {
81
+ font-weight: bold;
82
+ }
@@ -0,0 +1,28 @@
1
+ title: $:/plugins/tiddlywiki/highlight-legacy/usage
2
+
3
+ ! Usage
4
+
5
+ Syntax highlighting is triggered when you add language information to code blocks defined with triple backticks or with the `<$codeblock>` widget. For fenced code blocks, specify the code's language immediately after the first set of backticks:
6
+
7
+ ```
8
+ ```js
9
+ var a = b + c; // Highlighted as JavaScript
10
+ ```
11
+ ```
12
+
13
+ ! Adding Themes
14
+
15
+ You can add themes from highlight.js by copying the CSS to a new tiddler and tagging it with [[$:/tags/Stylesheet]]. The available themes can be found on GitHub:
16
+
17
+ https://github.com/isagalaev/highlight.js/tree/master/src/styles
18
+
19
+ ! Supporting Additional Languages
20
+
21
+ The [[highlight.js|https://github.com/highlightjs/highlight.js]] project supports many languages. Only a subset of these languages are supported by the plugin. It is possible for users to change the set of languages supported by the plugin by following these steps:
22
+
23
+ (Requires ~TiddlyWiki on Node.js)
24
+
25
+ # Go to the highlight.js project [[download page|https://highlightjs.org/download/]], select the language definitions to include, and press the Download button to download a zip archive containing customised support files for a highlight.js syntax highlighting server.
26
+ # Locate the `highlight.pack.js` file in the highlight plugin -- on a stock Debian 8 system running Tiddlywiki5 under node-js, it is in `/usr/local/lib/node_modules/tiddlywiki/plugins/tiddlywiki/highlight/files/`.
27
+ # Replace the plugin `highlight.pack.js` file located in step 2 with the one from the downloaded archive obtained in step 1.
28
+ # Restart the ~TiddlyWiki server.
@@ -2,5 +2,6 @@ title: $:/plugins/tiddlywiki/internals/EditTemplate/body/preview/raw
2
2
  tags: $:/tags/EditPreview
3
3
  caption: raw HTML
4
4
  list-after: $:/plugins/tiddlywiki/internals/EditTemplate/body/preview/widget-tree
5
+ code-body: yes
5
6
 
6
7
  <pre><code><$view field="text" format="htmlwikified" /></code></pre>
@@ -1,3 +1,3 @@
1
1
  title: $:/config/markdown/renderWikiTextPragma
2
2
 
3
- \rules only html image macrocallinline syslink transcludeinline wikilink filteredtranscludeblock macrocallblock transcludeblock
3
+ \rules only html image macrocallinline syslink transcludeinline wikilink filteredtranscludeblock macrocallblock transcludeblock latex-parser