mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-08-01 00:18:54 +00:00
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:
@@ -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>
|
||||
Reference in New Issue
Block a user