Fix palette fallback wrongly treating shadow palettes as missing

The is[missing] operator returns true for shadow tiddlers, so the fallback
introduced for missing palettes made every plugin palette compile as Vanilla
This commit is contained in:
Jeremy Ruston
2026-07-22 17:36:20 +01:00
parent d5f8a04230
commit 187849a6a9
2 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ tags: $:/tags/Macro
\procedure actions-recompile-current-palette()
\procedure tv-action-refresh-policy() always
<$transclude $variable="actions-compile-palette" inputPalette={{{ [{$:/palette}!is[missing]] :else[[$:/palettes/Vanilla]] }}} outputPalette="$:/temp/palette-colours"/>
<$transclude $variable="actions-compile-palette" inputPalette={{{ [{$:/palette}is[tiddler]] [{$:/palette}is[shadow]] :else[[$:/palettes/Vanilla]] }}} outputPalette="$:/temp/palette-colours"/>
\end actions-recompile-current-palette
\procedure tv-palette-name() $:/temp/palette-colours
@@ -0,0 +1,22 @@
title: Operators/Palettes/ShadowPaletteCompile
description: A shadow palette from a plugin compiles as itself, not the Vanilla fallback
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\import [subfilter{$:/core/config/GlobalImportFilter}]
(<<colour background>>)
+
title: Actions
\import [subfilter{$:/core/config/GlobalImportFilter}]
<<actions-recompile-current-palette>>
+
title: $:/palette
$:/palettes/TwentyTwenties
+
title: ExpectedResult
<p>(#FFFCF0)</p>