Remove wikify operator and refactor palette preview

The implementation of the palette preview is much less elegant like this, but it does work
This commit is contained in:
Jeremy Ruston
2024-11-07 18:30:39 +00:00
parent a4d930322e
commit 250e57cd79
14 changed files with 140 additions and 352 deletions

View File

@@ -6,12 +6,11 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
\import [subfilter{$:/core/config/GlobalImportFilter}]
<$text text={{{ [subfilter{Filter}] }}}/>
+
title: Filter
[function[colour],[primary]colour-darken[0.5]]
[[#5778d8]colour-darken[0.5]]
+
title: ExpectedResult

View File

@@ -1,18 +0,0 @@
title: Operators/Colour/ColourFunctionDiv
description: Simple colour function applied to a DIV
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
\import [subfilter{$:/core/config/GlobalImportFilter}]
<div style.background=<<colour page-background>>>
Something
</div>
+
title: ExpectedResult
<div style="background:#f4f4f4;">
Something
</div>

View File

@@ -1,18 +0,0 @@
title: Operators/Colour/ColourFunctionSimple
description: Simple colour function
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
\import [subfilter{$:/core/config/GlobalImportFilter}]
<$text text={{{ [subfilter{Filter}] }}}/>
+
title: Filter
[function[colour],[background]]
+
title: ExpectedResult
#ffffff

View File

@@ -6,12 +6,11 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
\import [subfilter{$:/core/config/GlobalImportFilter}]
<$text text={{{ [subfilter{Filter}] }}}/>
+
title: Filter
[function[colour],[primary]colour-lighten[0.5]]
[[#5778d8]colour-lighten[0.5]]
+
title: ExpectedResult

View File

@@ -6,12 +6,11 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
\import [subfilter{$:/core/config/GlobalImportFilter}]
<$text text={{{ [subfilter{Filter}] }}}/>
+
title: Filter
=[function[colour],[primary]colour-oklch[0.5]] =[function[colour],[primary]colour-oklch:l[0.5]] +[join[,]]
=[[#5778d8]colour-oklch[0.5]] =[[#5778d8]colour-oklch:l[0.5]] +[join[,]]
+
title: ExpectedResult

View File

@@ -1,21 +0,0 @@
title: Operators/Wikify/TextMode
description: Simple wikify operator
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
<$text text={{{ [subfilter{Filter}] }}}/>
+
title: Filter
[{Text}wikify[html],[inline],[text/vnd.tiddlywiki]]
+
title: Text
This is ''the text'' that is __wikified__
+
title: ExpectedResult
This is &lt;strong&gt;the text&lt;/strong&gt; that is &lt;u&gt;wikified&lt;/u&gt;

View File

@@ -1,64 +0,0 @@
title: Operators/Wikify/ParseTreeMode
description: Simple wikify operator
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
<$text text={{{ [subfilter{Filter}] }}}/>
+
title: Filter
[{Text}wikify[parsetree],[inline],[text/vnd.tiddlywiki]]
+
title: Text
This is ''the text'' that is __wikified__
+
title: ExpectedResult
[
{
"type": "text",
"text": "This is ",
"start": 0,
"end": 8
},
{
"type": "element",
"tag": "strong",
"children": [
{
"type": "text",
"text": "the text",
"start": 10,
"end": 18
}
],
"start": 8,
"end": 20,
"rule": "bold"
},
{
"type": "text",
"text": " that is ",
"start": 20,
"end": 29
},
{
"type": "element",
"tag": "u",
"children": [
{
"type": "text",
"text": "wikified",
"start": 31,
"end": 39
}
],
"start": 29,
"end": 41,
"rule": "underscore"
}
]

View File

@@ -1,21 +0,0 @@
title: Operators/Wikify/TextMode
description: Simple wikify operator
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
<$text text={{{ [subfilter{Filter}] }}}/>
+
title: Filter
[{Text}wikify[text],[inline],[text/vnd.tiddlywiki]]
+
title: Text
This is ''the text'' that is __wikified__
+
title: ExpectedResult
This is the text that is wikified