From ca41a8db047b67ccc2c0a2192bc0176448a30e02 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 24 Nov 2023 10:48:48 +0000 Subject: [PATCH] Core macros don't allow pragmas in action strings (#7855) * First commit * Transclude preferred over macrocall --- core/wiki/macros/colour-picker.tid | 12 ++++++------ core/wiki/macros/image-picker.tid | 10 +++++----- core/wiki/macros/tag-picker.tid | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/wiki/macros/colour-picker.tid b/core/wiki/macros/colour-picker.tid index 5c92af9df..1ff1e7b90 100644 --- a/core/wiki/macros/colour-picker.tid +++ b/core/wiki/macros/colour-picker.tid @@ -13,7 +13,7 @@ tags: $:/tags/Macro $(colour-picker-update-recent)$ -$actions$ +<$transclude $variable="__actions__"/> @@ -23,7 +23,7 @@ $actions$ \define colour-picker-recent-inner(actions) \whitespace trim <$set name="colour-picker-value" value="$(recentColour)$"> -<$macrocall $name="colour-picker-inner" actions="""$actions$"""/> +<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/> \end @@ -31,7 +31,7 @@ $actions$ \whitespace trim {{$:/language/ColourPicker/Recent}}<$list filter="[list[$:/config/ColourPicker/Recent]]" variable="recentColour"> -<$macrocall $name="colour-picker-recent-inner" actions="""$actions$"""/> +<$macrocall $name="colour-picker-recent-inner" actions=<<__actions__>>/> \end @@ -39,13 +39,13 @@ $actions$ \whitespace trim
-<$macrocall $name="colour-picker-recent" actions="""$actions$"""/> +<$macrocall $name="colour-picker-recent" actions=<<__actions__>>/> --- <$list filter="LightPink Pink Crimson LavenderBlush PaleVioletRed HotPink DeepPink MediumVioletRed Orchid Thistle Plum Violet Magenta Fuchsia DarkMagenta Purple MediumOrchid DarkViolet DarkOrchid Indigo BlueViolet MediumPurple MediumSlateBlue SlateBlue DarkSlateBlue Lavender GhostWhite Blue MediumBlue MidnightBlue DarkBlue Navy RoyalBlue CornflowerBlue LightSteelBlue LightSlateGrey SlateGrey DodgerBlue AliceBlue SteelBlue LightSkyBlue SkyBlue DeepSkyBlue LightBlue PowderBlue CadetBlue Azure LightCyan PaleTurquoise Cyan Aqua DarkTurquoise DarkSlateGrey DarkCyan Teal MediumTurquoise LightSeaGreen Turquoise Aquamarine MediumAquamarine MediumSpringGreen MintCream SpringGreen MediumSeaGreen SeaGreen Honeydew LightGreen PaleGreen DarkSeaGreen LimeGreen Lime ForestGreen Green DarkGreen Chartreuse LawnGreen GreenYellow DarkOliveGreen YellowGreen OliveDrab Beige LightGoldenrodYellow Ivory LightYellow Yellow Olive DarkKhaki LemonChiffon PaleGoldenrod Khaki Gold Cornsilk Goldenrod DarkGoldenrod FloralWhite OldLace Wheat Moccasin Orange PapayaWhip BlanchedAlmond NavajoWhite AntiqueWhite Tan BurlyWood Bisque DarkOrange Linen Peru PeachPuff SandyBrown Chocolate SaddleBrown Seashell Sienna LightSalmon Coral OrangeRed DarkSalmon Tomato MistyRose Salmon Snow LightCoral RosyBrown IndianRed Red Brown FireBrick DarkRed Maroon White WhiteSmoke Gainsboro LightGrey Silver DarkGrey Grey DimGrey Black" variable="colour-picker-value"> -<$macrocall $name="colour-picker-inner" actions="""$actions$"""/> +<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/> --- @@ -54,7 +54,7 @@ $actions$ <$edit-text tiddler="$:/config/ColourPicker/New" type="color" tag="input"/> <$set name="colour-picker-value" value={{$:/config/ColourPicker/New}}> -<$macrocall $name="colour-picker-inner" actions="""$actions$"""/> +<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/>
diff --git a/core/wiki/macros/image-picker.tid b/core/wiki/macros/image-picker.tid index 464a53e7b..5f09ced0d 100644 --- a/core/wiki/macros/image-picker.tid +++ b/core/wiki/macros/image-picker.tid @@ -5,13 +5,13 @@ title: $:/core/macros/image-picker type: text/vnd.tiddlywiki \define image-picker-thumbnail(actions) -<$button tag="a" tooltip="""$(imageTitle)$""">$actions$<$transclude tiddler=<>/> +<$button tag="a" tooltip="""$(imageTitle)$"""><$transclude $variable="__actions__"/><$transclude tiddler=<>/> \end \define image-picker-list(filter,actions) \whitespace trim <$list filter="""$filter$""" variable="imageTitle"> -<$macrocall $name="image-picker-thumbnail" actions="""$actions$"""/> +<$macrocall $name="image-picker-thumbnail" actions=<<__actions__>>/> \end @@ -25,15 +25,15 @@ type: text/vnd.tiddlywiki {{$:/language/SystemTiddlers/Include/Prompt}} <$reveal state=<> type="match" text="hide" default="hide" tag="div"> -<$macrocall $name="image-picker-list" filter="""$filter$ +[!is[system]]""" actions="""$actions$"""/> +<$macrocall $name="image-picker-list" filter="""$filter$ +[!is[system]]""" actions=<<__actions__>>/> <$reveal state=<> type="nomatch" text="hide" default="hide" tag="div"> -<$macrocall $name="image-picker-list" filter="""$filter$""" actions="""$actions$"""/> +<$macrocall $name="image-picker-list" filter="""$filter$""" actions=<<__actions__>>/> \end \define image-picker-include-tagged-images(actions) -<$macrocall $name="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions="""$actions$"""/> +<$macrocall $name="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions=<<__actions__>>/> \end diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index e1b1a7139..ede53ec26 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -16,7 +16,7 @@ second-search-filter: [tags[]is[system]search:titlesort[]] emptyMessage="<$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter='-[]'/>" > <$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter="[trim[]]"/> - $actions$ + <$transclude $variable="__actions__"/> <> @@ -102,7 +102,7 @@ second-search-filter: [tags[]is[system]search:titlesort[]] <$set name="tag" value={{{ [get[text]] }}}> <$button set=<> setTo="" class=""> <$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter="[trim[]]"/> - $actions$ + <$transclude $variable="__actions__"/> <$set name="currentTiddlerCSSEscaped" value={{{ [escapecss[]] }}}> <><$action-sendmessage $message="tm-focus-selector" $param=<>/>