From a66b04f532b1dd695531bc6076bf8263c25969ad Mon Sep 17 00:00:00 2001 From: WhiteFall <32425955+Zacharia2@users.noreply.github.com> Date: Fri, 9 Jun 2023 04:39:33 +0800 Subject: [PATCH 01/13] Signing the CLA (#7516) --- licenses/cla-individual.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index ac868477f..9693779c5 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -531,3 +531,5 @@ Michelle Saad, @michsa, 2023-03-08 Carmine Guida, @carmineguida, 2023-05-17 Tavin Cole, @tavin, 2023/05/25 + +WhiteFall, @Zacharia2, 2023/06/04 From 5947140b61793ef85473e285039e05cf1e4b00d6 Mon Sep 17 00:00:00 2001 From: TonyM <31584658+AnthonyMuscio@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:59:40 +1000 Subject: [PATCH 02/13] Update Using Excise.tid (#7504) Added a comma and fixed a typo --- editions/tw5.com/tiddlers/howtos/Using Excise.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/howtos/Using Excise.tid b/editions/tw5.com/tiddlers/howtos/Using Excise.tid index 7d618a3b9..cd916a752 100644 --- a/editions/tw5.com/tiddlers/howtos/Using Excise.tid +++ b/editions/tw5.com/tiddlers/howtos/Using Excise.tid @@ -5,13 +5,13 @@ title: Using Excise type: text/vnd.tiddlywiki ! Excise text -From the EditorToolbar you can export selected text to a new tiddler and insert a [[link|Linking in WikiText]] [[Transclusion]] or [[macro|Macros]] in its place. Click ''Excise text'' (<<.icon $:/core/images/excise>>), input name of the new tiddler, and choose excise method. +From the EditorToolbar you can export selected text to a new tiddler and insert a [[link|Linking in WikiText]], [[Transclusion]] or [[macro|Macros]] in its place. Click ''Excise text'' (<<.icon $:/core/images/excise>>), input name of the new tiddler, and choose excise method. !! How to excise text # Highlight the relevant piece of text # Click ''Excise text'' (<<.icon $:/core/images/excise>>) # Give the new tiddler a title. -# Chosse if the new tiddler will be tagged with the title of the current tiddler (see note below). +# Choose if the new tiddler will be tagged with the title of the current tiddler (see note below). # Choose replacing method: [[link|Linking in WikiText]], [[transclusion|Transclusion]], or [[macro|Macros]]. # Click the ''{{$:/language/Buttons/Excise/Caption/Excise}}'' button From 46d0aea0f219d3686694b2094564b755f97bef0c Mon Sep 17 00:00:00 2001 From: twMat Date: Tue, 13 Jun 2023 12:02:06 +0200 Subject: [PATCH 03/13] Update ShadowTiddlers.tid (updated) (#7518) * Update ShadowTiddlers.tid main change is added section about "overriding shadow tids" * The word "extracted" might be confusing --------- Co-authored-by: jeremy@jermolene.com --- editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid b/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid index 11abdd2e9..89417bc65 100644 --- a/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid +++ b/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid @@ -9,9 +9,13 @@ tags: Concepts <$button actions=<>>$text$ \end -ShadowTiddlers are tiddlers that are loaded from within [[Plugins]]. Unlike ordinary tiddlers, they don't appear in most lists. +ShadowTiddlers are tiddlers that are loaded from [[Plugins]] at the wiki startup. Unlike ordinary tiddlers, they don't appear in most lists. -ShadowTiddlers can be overridden with an ordinary tiddler of the same name. If that tiddler is subsequently deleted then the original shadow tiddler is automatically restored. +!! Overriding Shadow Tiddlers to modify plugins + +A ShadowTiddler can be overridden with an ordinary tiddler of the same name. This leaves the shadow tiddler intact but the plugin will use the overriding tiddler in its place, effectively allowing users to modify the behaviour of plugins. + +Users are cautioned against overriding shadow tiddlers because if the shadow tiddler is changed in a plugin update, the overriding tiddler may no longer perform as intended. To remedy this, the overriding tiddler may be modified or deleted. If the overriding tiddler is deleted, then the plugin falls back to using the original shadow tiddler. !! Overridden Shadow Tiddlers From 73b23f48a08cbef2d56946955a557fc760b5b581 Mon Sep 17 00:00:00 2001 From: Maurycy Zarzycki Date: Wed, 14 Jun 2023 08:42:49 +0200 Subject: [PATCH 04/13] Polish Translations 2023-06-14 (#7540) * Add Polish translations for strings introduced in 2221b8e08a572b4899081cb86e7f9a1dd57adf11 * Add Polish translations for strings changed in 98e72558d03ba5242d847265525f62dc93d434a5 * Add Polish translations for strings changed in d1f90f075f7cf41531f5e967b02acbc244885904 --- languages/pl-PL/Buttons.multids | 2 ++ languages/pl-PL/Misc.multids | 2 ++ languages/pl-PL/SiteTitle.tid | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/languages/pl-PL/Buttons.multids b/languages/pl-PL/Buttons.multids index 8d5fa3465..911559337 100644 --- a/languages/pl-PL/Buttons.multids +++ b/languages/pl-PL/Buttons.multids @@ -67,6 +67,8 @@ More/Caption: więcej More/Hint: Więcej akcji NewHere/Caption: nowy tiddler tu NewHere/Hint: Stwórz nowego tiddlera otagowanego tym tiddlerem +NetworkActivity/Caption: ruch sieciowy +NetworkActivity/Hint: Anuluj cały ruch sieciowy NewJournal/Caption: nowy dziennik NewJournal/Hint: Tworzy nowego tiddlera o typie dziennika NewJournalHere/Caption: nowy dziennik tu diff --git a/languages/pl-PL/Misc.multids b/languages/pl-PL/Misc.multids index 1dee7fe68..211798bc8 100644 --- a/languages/pl-PL/Misc.multids +++ b/languages/pl-PL/Misc.multids @@ -25,6 +25,8 @@ Encryption/RepeatPassword: Powtórz hasło Encryption/PasswordNoMatch: Hasła się nie zgadzają Encryption/SetPassword: Ustaw hasło Error/Caption: Bład +Error/DeserializeOperator/MissingOperand: Błąd filtra: Nie podano argumentu dla operatora 'deserialize' +Error/DeserializeOperator/UnknownDeserializer: Błąd filtra: Podano nieznany deserializator jako argument dla operatora 'deserialize' Error/Filter: Bład filtra Error/FilterSyntax: Bład składniowy filtra Error/FilterRunPrefix: Bład filtra: Nieznany prefiks dla filtra 'run' diff --git a/languages/pl-PL/SiteTitle.tid b/languages/pl-PL/SiteTitle.tid index 13af3bb3b..7fbd5a790 100644 --- a/languages/pl-PL/SiteTitle.tid +++ b/languages/pl-PL/SiteTitle.tid @@ -1,3 +1,3 @@ title: $:/SiteTitle -Moja ~TiddlyWiki +Moja TiddlyWiki From b61c01d8b0bf90ef012fe4ef12cab3624f6362fb Mon Sep 17 00:00:00 2001 From: cdruan <80615570+cdruan@users.noreply.github.com> Date: Wed, 14 Jun 2023 01:55:16 -0700 Subject: [PATCH 05/13] Update widget name policy (#7510) --- plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js b/plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js index 7870cb8c4..64189ba8b 100644 --- a/plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js +++ b/plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js @@ -200,7 +200,7 @@ function tw_filteredtranscludeinline(state,silent) { } // based on markdown-it html_block() -var WidgetTagRegEx = [/^<\/?\$[a-zA-Z0-9\-\$]+(?=(\s|\/?>|$))/, /^$/]; +var WidgetTagRegEx = [/^<\/?\$[a-zA-Z0-9\-\$\.]+(?=(\s|\/?>|$))/, /^$/]; function tw_block(state,startLine,endLine,silent) { var i, nextLine, token, lineText, pos = state.bMarks[startLine] + state.tShift[startLine], @@ -364,7 +364,7 @@ function tw_prettyextlink(state,silent) { return true; } -var TWCloseTagRegEx = /<\/\$[A-Za-z0-9\-\$]+\s*>/gm; +var TWCloseTagRegEx = /<\/\$[A-Za-z0-9\-\$\.]+\s*>/gm; function extendHtmlInline(origRule) { return function(state,silent) { if(origRule(state,silent)) { From edaa3727d976f4a5efa2468726480880f5ca8dcc Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 14 Jun 2023 09:59:18 +0100 Subject: [PATCH 06/13] Update Release 5.3.0.tid --- editions/prerelease/tiddlers/Release 5.3.0.tid | 1 - 1 file changed, 1 deletion(-) diff --git a/editions/prerelease/tiddlers/Release 5.3.0.tid b/editions/prerelease/tiddlers/Release 5.3.0.tid index db7e3a3b9..cf1ce0098 100644 --- a/editions/prerelease/tiddlers/Release 5.3.0.tid +++ b/editions/prerelease/tiddlers/Release 5.3.0.tid @@ -83,7 +83,6 @@ Improvements to the following translations: * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7529">> size of buttons in dropdown for editor "link" toolbar button * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/8e132948b6bec623d81d300fbe6dc3a0307bcc6d">> crash when transcluding a lazily loaded tiddler as an attribute value * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7462">> DiffTextWidget crash with missing or empty attributes -* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7448">> CheckboxWidget to avoid writing to date fields ! Developer Improvements From f4626aa69e39fb439cad674aea596ab7fc5b15c4 Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Wed, 14 Jun 2023 18:57:43 +0200 Subject: [PATCH 07/13] Fix: Fix tests for deserialize[] so they can be run on browser as well as node.js (#7543) --- editions/test/tiddlers/tests/test-filters.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editions/test/tiddlers/tests/test-filters.js b/editions/test/tiddlers/tests/test-filters.js index 1ffc73f17..811bbaa55 100644 --- a/editions/test/tiddlers/tests/test-filters.js +++ b/editions/test/tiddlers/tests/test-filters.js @@ -1066,7 +1066,11 @@ Tests the filtering mechanism. }); it("should handle the deserializers operator", function() { - expect(wiki.filterTiddlers("[deserializers[]]").join(",")).toBe("application/javascript,application/json,application/x-tiddler,application/x-tiddler-html-div,application/x-tiddlers,text/css,text/html,text/plain"); + var expectedDeserializers = ["application/javascript","application/json","application/x-tiddler","application/x-tiddler-html-div","application/x-tiddlers","text/css","text/html","text/plain"]; + if($tw.browser) { + expectedDeserializers.unshift("(DOM)"); + } + expect(wiki.filterTiddlers("[deserializers[]]").join(",")).toBe(expectedDeserializers.join(",")); }); it("should handle the charcode operator", function() { From 5bef6d50bc367cf4c9a3b98dd2fdc792a0603c10 Mon Sep 17 00:00:00 2001 From: btheado Date: Thu, 15 Jun 2023 05:10:25 -0500 Subject: [PATCH 08/13] Removed stale reference to double dollar signs for custom widgets (#7546) --- editions/tw5.com/tiddlers/variables/Variable Usage.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/variables/Variable Usage.tid b/editions/tw5.com/tiddlers/variables/Variable Usage.tid index bc5f36443..9db23a456 100644 --- a/editions/tw5.com/tiddlers/variables/Variable Usage.tid +++ b/editions/tw5.com/tiddlers/variables/Variable Usage.tid @@ -151,4 +151,4 @@ Below is an example macro, procedure and function definition. All three forms o *''variables'' - \define, <<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget, \function all create variables. If the same name is used, then later define will overwrite earlier defined *''<<.op function>> filter operator parameter'' - only variables defined using \function can be called using the <<.olink function>> operator *''filter operators'' - only the [[javascript defined filter operators|Filter Operators]] and variables defined using \function with name containing a dot can be called - *''widgets'' - variables defined using \widget can be invoked using `<$widget/>` syntax ONLY if the name starts a dollar sign (to override existing javascript defined widgets) or double dollar sign (to define [[custom widgets|Custom Widgets]]). Without the dollar sign prefix, defining variables using \widget is no different than using \procedure. + *''widgets'' - variables defined using \widget can be invoked using `<$widget/>` syntax ONLY if the name starts a dollar sign. Without the dollar sign prefix, defining variables using \widget is no different than using \procedure. From 190613ad2989f70526f86eef17f524087f60eb72 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Sat, 17 Jun 2023 08:58:15 +0100 Subject: [PATCH 09/13] Add tv-config-static variable for indicating static rendering --- core/templates/exporters/StaticRiver.tid | 1 + core/templates/server/static.tiddler.html.tid | 1 + core/templates/static.template.html.tid | 1 + core/templates/static.tiddler.html.tid | 1 + .../tiddlers/variables/tv-config-static Variable.tid | 10 ++++++++++ 5 files changed, 14 insertions(+) create mode 100644 editions/tw5.com/tiddlers/variables/tv-config-static Variable.tid diff --git a/core/templates/exporters/StaticRiver.tid b/core/templates/exporters/StaticRiver.tid index a22cfb98a..3b70c9d11 100644 --- a/core/templates/exporters/StaticRiver.tid +++ b/core/templates/exporters/StaticRiver.tid @@ -3,6 +3,7 @@ tags: $:/tags/Exporter description: {{$:/language/Exporters/StaticRiver}} extension: .html +\define tv-config-static() yes \define tv-wikilink-template() #$uri_encoded$ \define tv-config-toolbar-icons() no \define tv-config-toolbar-text() no diff --git a/core/templates/server/static.tiddler.html.tid b/core/templates/server/static.tiddler.html.tid index a8409e50f..6c9fd80a5 100644 --- a/core/templates/server/static.tiddler.html.tid +++ b/core/templates/server/static.tiddler.html.tid @@ -1,6 +1,7 @@ title: $:/core/templates/server/static.tiddler.html \whitespace trim +\define tv-config-static() yes \define tv-wikilink-template() $uri_encoded$ \import [subfilter{$:/core/config/GlobalImportFilter}] diff --git a/core/templates/static.template.html.tid b/core/templates/static.template.html.tid index 5da5fb752..8b6482846 100644 --- a/core/templates/static.template.html.tid +++ b/core/templates/static.template.html.tid @@ -1,6 +1,7 @@ title: $:/core/templates/static.template.html type: text/vnd.tiddlywiki-html +\define tv-config-static() yes \define tv-wikilink-template() static/$uri_doubleencoded$.html \define tv-config-toolbar-icons() no \define tv-config-toolbar-text() no diff --git a/core/templates/static.tiddler.html.tid b/core/templates/static.tiddler.html.tid index f90818464..a3297ee78 100644 --- a/core/templates/static.tiddler.html.tid +++ b/core/templates/static.tiddler.html.tid @@ -1,6 +1,7 @@ title: $:/core/templates/static.tiddler.html \define tv-wikilink-template() $uri_doubleencoded$.html +\define tv-config-static() yes \define tv-config-toolbar-icons() no \define tv-config-toolbar-text() no \define tv-config-toolbar-class() tc-btn-invisible diff --git a/editions/tw5.com/tiddlers/variables/tv-config-static Variable.tid b/editions/tw5.com/tiddlers/variables/tv-config-static Variable.tid new file mode 100644 index 000000000..1534c9fb5 --- /dev/null +++ b/editions/tw5.com/tiddlers/variables/tv-config-static Variable.tid @@ -0,0 +1,10 @@ +created: 20230617085524754 +modified: 20230617085524754 +title: tv-config-static Variable +tags: Variables [[Core Variables]] [[Configuration Variables]] +type: text/vnd.tiddlywiki +caption: tv-config-static + +<<.from-version "5.3.0">> The <<.def tv-config-static>> [[variable|Variables]] is set to `yes` within static rendering templates, and is unset in other contexts. + +It is useful for selectively hiding or showing content depending on whether a rendering is static or interactive. From d8124ee82da224ca640be411cbb90fdfa2378db0 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Sat, 17 Jun 2023 08:58:50 +0100 Subject: [PATCH 10/13] Menu bar plugin: Hide menu bar in static renderings Fixes #7476 --- plugins/tiddlywiki/menubar/menu.tid | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/tiddlywiki/menubar/menu.tid b/plugins/tiddlywiki/menubar/menu.tid index 1d592cbfa..473416891 100644 --- a/plugins/tiddlywiki/menubar/menu.tid +++ b/plugins/tiddlywiki/menubar/menu.tid @@ -42,6 +42,7 @@ tags: $:/tags/PageTemplate \end +<$list filter="[!match[yes]]" variable="ignore"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]] -[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/topleftbar]] -[all[tiddlers+shadows]tag[$:/tags/TopRightBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/toprightbar]] +[limit[1]]" variable="listItem"> + From b90c9ef9a08ad63e8a00f90a1e89a79688cb613b Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Sat, 17 Jun 2023 10:32:44 +0100 Subject: [PATCH 11/13] Transclude widget should only create double underscore variables for macros and ordinary variables Fixes #7544 --- core/modules/widgets/transclude.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index 1117598de..9902f7632 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -178,7 +178,6 @@ TranscludeWidget.prototype.getTransclusionTarget = function() { srcVariable = variableInfo && variableInfo.srcVariable; if(variableInfo.text) { if(srcVariable.isFunctionDefinition) { - // Function to return parameters by name or position var result = (variableInfo.resultList ? variableInfo.resultList[0] : variableInfo.text) || ""; parser = { tree: [{ @@ -235,7 +234,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() { } $tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"]) }); - } else { + } else if(srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition) { // For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__" parser = { tree: [ From 13a895bd2daddabdfaadb04e20dbc7563c9c39be Mon Sep 17 00:00:00 2001 From: btheado Date: Sun, 18 Jun 2023 05:05:06 -0500 Subject: [PATCH 12/13] Remove text subst from operator example macro (#7550) * Removed textual substitution from .operator-example macro * Convert .operator-example from macro to procedure --- .../tw5.com/tiddlers/system/operator-macros.tid | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/operator-macros.tid b/editions/tw5.com/tiddlers/system/operator-macros.tid index d24cac016..afa0593b1 100644 --- a/editions/tw5.com/tiddlers/system/operator-macros.tid +++ b/editions/tw5.com/tiddlers/system/operator-macros.tid @@ -1,17 +1,17 @@ created: 20150117152607000 -modified: 20220227210111054 +modified: 20230617183916622 tags: $:/tags/Macro title: $:/editions/tw5.com/operator-macros \define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$ -\define .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<<__eg__>>/> -\define .operator-example(n,eg,ie) +\procedure .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<>/> +\procedure .operator-example(n,eg,ie)
-<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> +<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix]" variable=".state"> <$reveal state=<<.state>> type="nomatch" text="show"> - `$eg$` - <$macrocall $name=".if" cond="""$ie$""" then="""
→ $ie$
"""/> + <$text text=<>/> + <$macrocall $name=".if" cond=<> then={{{[[
→ ]addsuffixaddsuffix[
]]}}}/>
<$button actions=<<.operator-example-tryit-actions>>>Try it
@@ -21,7 +21,7 @@ title: $:/editions/tw5.com/operator-macros
<$button set=<<.state>> setTo="">Hide - <$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<__eg__>>> + <$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<>> <$button actions=<<.operator-example-tryit-actions>>>Reset
From 6fd2139376b607667796709e188f992adc41c416 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Tue, 20 Jun 2023 15:43:13 +0100 Subject: [PATCH 13/13] Use empty edition to create empty.html and empty.hta Fixes #7555 --- bin/build-site.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-site.sh b/bin/build-site.sh index a9133c2b7..a54d16452 100755 --- a/bin/build-site.sh +++ b/bin/build-site.sh @@ -107,7 +107,7 @@ node $TW5_BUILD_TIDDLYWIKI \ # /empty.html Empty # /empty.hta For Internet Explorer node $TW5_BUILD_TIDDLYWIKI \ - $TW5_BUILD_MAIN_EDITION \ + ./editions/empty \ --verbose \ --output $TW5_BUILD_OUTPUT \ --build empty \