From 6f98edd6bd2b9d49f9120709dbd81fcc52af887b Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Fri, 7 Oct 2022 18:43:09 +0100 Subject: [PATCH] Revert "Add default settings for styled inline SPANs (#6877)" because of failed tests This reverts commit 23e0eeb556d1933f4fedfa3225ea733c7a0aa260. --- .../parsers/wikiparser/rules/styleinline.js | 6 +++--- core/palettes/Blanca.tid | 2 -- core/palettes/Blue.tid | 2 -- core/palettes/BrightMute.tid | 2 -- core/palettes/ContrastDark.tid | 2 -- core/palettes/ContrastLight.tid | 2 -- core/palettes/CupertinoDark.tid | 2 -- core/palettes/DarkPhotos.tid | 2 -- core/palettes/DesertSand.tid | 2 -- core/palettes/GruvBoxDark.tid | 2 -- core/palettes/Nord.tid | 2 -- core/palettes/Rocker.tid | 2 -- core/palettes/SolarFlare.tid | 2 -- core/palettes/SolarizedDark.tid | 2 -- core/palettes/SolarizedLight.tid | 2 -- core/palettes/SpartanDay.tid | 2 -- core/palettes/SpartanNight.tid | 2 -- core/palettes/Twilight.tid | 2 -- core/palettes/Vanilla.tid | 2 -- .../tiddlers/$__editions_tw5.com_doc-macros.tid | 2 +- editions/test/tiddlers/tests/test-wikitext.js | 16 ---------------- editions/tw5.com/tiddlers/system/doc-macros.tid | 2 +- themes/tiddlywiki/vanilla/base.tid | 5 ----- 23 files changed, 5 insertions(+), 62 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/styleinline.js b/core/modules/parsers/wikiparser/rules/styleinline.js index 653e48986..cd42d8f00 100644 --- a/core/modules/parsers/wikiparser/rules/styleinline.js +++ b/core/modules/parsers/wikiparser/rules/styleinline.js @@ -41,6 +41,9 @@ exports.parse = function() { var node = { type: "element", tag: "span", + attributes: { + "class": {type: "string", value: "tc-inline-style"} + }, children: tree }; if(classString) { @@ -49,9 +52,6 @@ exports.parse = function() { if(stylesString) { $tw.utils.addAttributeToParseTreeNode(node,"style",stylesString); } - if(!classString && !stylesString) { - $tw.utils.addClassToParseTreeNode(node,"tc-inline-style"); - } return [node]; }; diff --git a/core/palettes/Blanca.tid b/core/palettes/Blanca.tid index 0fd8e2da3..f86705443 100644 --- a/core/palettes/Blanca.tid +++ b/core/palettes/Blanca.tid @@ -34,8 +34,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: #ecf2ff message-border: #cfd6e6 message-foreground: #547599 diff --git a/core/palettes/Blue.tid b/core/palettes/Blue.tid index cc3846b50..e3aa21952 100644 --- a/core/palettes/Blue.tid +++ b/core/palettes/Blue.tid @@ -34,8 +34,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333353 -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: #ecf2ff message-border: #cfd6e6 message-foreground: #547599 diff --git a/core/palettes/BrightMute.tid b/core/palettes/BrightMute.tid index ddbd6b3cd..64193c1ce 100644 --- a/core/palettes/BrightMute.tid +++ b/core/palettes/BrightMute.tid @@ -34,8 +34,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: #ecf2ff message-border: #cfd6e6 message-foreground: #547599 diff --git a/core/palettes/ContrastDark.tid b/core/palettes/ContrastDark.tid index 850a5863b..ded11b835 100644 --- a/core/palettes/ContrastDark.tid +++ b/core/palettes/ContrastDark.tid @@ -34,8 +34,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #00a external-link-foreground: #00e foreground: #000 -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: <> message-border: <> message-foreground: <> diff --git a/core/palettes/ContrastLight.tid b/core/palettes/ContrastLight.tid index ade9f43f8..d3eb2f731 100644 --- a/core/palettes/ContrastLight.tid +++ b/core/palettes/ContrastLight.tid @@ -34,8 +34,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #00a external-link-foreground: #00e foreground: #fff -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: <> message-border: <> message-foreground: <> diff --git a/core/palettes/CupertinoDark.tid b/core/palettes/CupertinoDark.tid index 7f08f4100..c956561ed 100644 --- a/core/palettes/CupertinoDark.tid +++ b/core/palettes/CupertinoDark.tid @@ -32,8 +32,6 @@ external-link-foreground-hover: external-link-foreground-visited: #BF5AF2 external-link-foreground: #32D74B foreground: #FFFFFF -highlight-background: #ffff78 -highlight-foreground: #000000 menubar-background: #464646 menubar-foreground: #ffffff message-background: <> diff --git a/core/palettes/DarkPhotos.tid b/core/palettes/DarkPhotos.tid index 71fa40f2f..4e1949c04 100644 --- a/core/palettes/DarkPhotos.tid +++ b/core/palettes/DarkPhotos.tid @@ -36,8 +36,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: #ecf2ff message-border: #cfd6e6 message-foreground: #547599 diff --git a/core/palettes/DesertSand.tid b/core/palettes/DesertSand.tid index ddce80e27..40056962b 100644 --- a/core/palettes/DesertSand.tid +++ b/core/palettes/DesertSand.tid @@ -40,8 +40,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #313163 external-link-foreground: #555592 foreground: #2D2A23 -highlight-background: #ffff00 -highlight-foreground: #000000 menubar-background: #CDC2A6 menubar-foreground: #5A5446 message-background: #ECE5CF diff --git a/core/palettes/GruvBoxDark.tid b/core/palettes/GruvBoxDark.tid index 3b62eb311..840d8683e 100644 --- a/core/palettes/GruvBoxDark.tid +++ b/core/palettes/GruvBoxDark.tid @@ -41,8 +41,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #d3869b external-link-foreground: #8ec07c foreground: #fbf1c7 -highlight-background: #ffff79 -highlight-foreground: #000000 menubar-background: #504945 menubar-foreground: <> message-background: #83a598 diff --git a/core/palettes/Nord.tid b/core/palettes/Nord.tid index b296ba783..f825f45f2 100644 --- a/core/palettes/Nord.tid +++ b/core/palettes/Nord.tid @@ -41,8 +41,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #5E81AC external-link-foreground: #8FBCBB foreground: #d8dee9 -highlight-background: #ffff78 -highlight-foreground: #000000 menubar-background: #2E3440 menubar-foreground: #d8dee9 message-background: #2E3440 diff --git a/core/palettes/Rocker.tid b/core/palettes/Rocker.tid index a91cd1b5f..bc7d2ded6 100644 --- a/core/palettes/Rocker.tid +++ b/core/palettes/Rocker.tid @@ -34,8 +34,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: #ecf2ff message-border: #cfd6e6 message-foreground: #547599 diff --git a/core/palettes/SolarFlare.tid b/core/palettes/SolarFlare.tid index 4d81bf531..e72815657 100644 --- a/core/palettes/SolarFlare.tid +++ b/core/palettes/SolarFlare.tid @@ -131,8 +131,6 @@ external-link-background-hover: inherit external-link-background-visited: inherit external-link-background: inherit external-link-foreground-hover: inherit -highlight-background: #ffff00 -highlight-foreground: #000000 message-border: #cfd6e6 modal-border: #999999 select-tag-background: diff --git a/core/palettes/SolarizedDark.tid b/core/palettes/SolarizedDark.tid index eea273c30..f193bff1c 100644 --- a/core/palettes/SolarizedDark.tid +++ b/core/palettes/SolarizedDark.tid @@ -35,8 +35,6 @@ external-link-foreground: #268bd2 external-link-foreground-hover: external-link-foreground-visited: #268bd2 foreground: #839496 -highlight-background: #ffff78 -highlight-foreground: #000000 message-background: #002b36 message-border: #586e75 message-foreground: #839496 diff --git a/core/palettes/SolarizedLight.tid b/core/palettes/SolarizedLight.tid index 3cf954bb5..4bcec81d6 100644 --- a/core/palettes/SolarizedLight.tid +++ b/core/palettes/SolarizedLight.tid @@ -35,8 +35,6 @@ external-link-foreground: #268bd2 external-link-foreground-hover: inherit external-link-foreground-visited: #268bd2 foreground: #657b83 -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: #fdf6e3 message-border: #93a1a1 message-foreground: #657b83 diff --git a/core/palettes/SpartanDay.tid b/core/palettes/SpartanDay.tid index cc197144e..3cd8337a7 100644 --- a/core/palettes/SpartanDay.tid +++ b/core/palettes/SpartanDay.tid @@ -34,8 +34,6 @@ external-link-foreground-hover: external-link-foreground-visited: external-link-foreground: foreground: rgba(0, 0, 0, 0.87) -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: <> message-border: <> message-foreground: rgba(0, 0, 0, 0.54) diff --git a/core/palettes/SpartanNight.tid b/core/palettes/SpartanNight.tid index dc47a0774..1962c4782 100644 --- a/core/palettes/SpartanNight.tid +++ b/core/palettes/SpartanNight.tid @@ -34,8 +34,6 @@ external-link-foreground-hover: external-link-foreground-visited: #7c318c external-link-foreground: #9e3eb3 foreground: rgba(255, 255, 255, 0.7) -highlight-background: #ffff78 -highlight-foreground: #000000 message-background: <> message-border: <> message-foreground: rgba(255, 255, 255, 0.54) diff --git a/core/palettes/Twilight.tid b/core/palettes/Twilight.tid index 4c127f822..ff8a0b956 100644 --- a/core/palettes/Twilight.tid +++ b/core/palettes/Twilight.tid @@ -43,8 +43,6 @@ external-link-foreground: rgb(179, 179, 255) external-link-foreground-hover: inherit external-link-foreground-visited: rgb(153, 153, 255) foreground: rgb(179, 179, 179) -highlight-background: #ffff78 -highlight-foreground: #000000 message-background: <> message-border: #96ccff message-foreground: <> diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid index d84b4ec83..d3c7b1441 100644 --- a/core/palettes/Vanilla.tid +++ b/core/palettes/Vanilla.tid @@ -42,8 +42,6 @@ external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee foreground: #333333 -highlight-background: #ffff00 -highlight-foreground: #000000 message-background: #ecf2ff message-border: #cfd6e6 message-foreground: #547599 diff --git a/editions/fr-FR/tiddlers/$__editions_tw5.com_doc-macros.tid b/editions/fr-FR/tiddlers/$__editions_tw5.com_doc-macros.tid index fcf3ddb80..de6376218 100644 --- a/editions/fr-FR/tiddlers/$__editions_tw5.com_doc-macros.tid +++ b/editions/fr-FR/tiddlers/$__editions_tw5.com_doc-macros.tid @@ -117,7 +117,7 @@ C'est un exemple de tiddler. Voir [[Macros Table des matières (Exemples)|Table- - +
Attention :
Ne faites pas comme ça !
Attention :
Ne faites pas comme ça !
$eg$ diff --git a/editions/test/tiddlers/tests/test-wikitext.js b/editions/test/tiddlers/tests/test-wikitext.js index 4cab566da..3213f6abf 100644 --- a/editions/test/tiddlers/tests/test-wikitext.js +++ b/editions/test/tiddlers/tests/test-wikitext.js @@ -63,22 +63,6 @@ describe("WikiText tests", function() { expect(wiki.renderText("text/html","text/vnd-tiddlywiki","@@color:red;\n
\n\nContent
\n@@")).toBe("

Content

"); expect(wiki.renderText("text/html","text/vnd-tiddlywiki","@@color:red;\n---\n@@")).toBe("
"); }); - it("handles inline style wikitext notation", function() { - expect(wiki.renderText("text/html","text/vnd-tiddlywiki", - "some @@highlighted@@ text")).toBe('

some highlighted text

'); - expect(wiki.renderText("text/html","text/vnd-tiddlywiki", - "some @@color:green;.tc-inline-style 1 style and 1 class@@ text")).toBe('

some 1 style and 1 class text

'); - expect(wiki.renderText("text/html","text/vnd-tiddlywiki", - "some @@background-color:red;red@@ text")).toBe('

some red text

'); - expect(wiki.renderText("text/html","text/vnd-tiddlywiki", - "some @@.myClass class@@ text")).toBe('

some class text

'); - expect(wiki.renderText("text/html","text/vnd-tiddlywiki", - "some @@.myClass.secondClass 2 classes@@ text")).toBe('

some 2 classes text

'); - expect(wiki.renderText("text/html","text/vnd-tiddlywiki", - "some @@background:red;.myClass style and class@@ text")).toBe('

some style and class text

'); - expect(wiki.renderText("text/html","text/vnd-tiddlywiki", - "some @@background:red;color:white;.myClass 2 style and 1 class@@ text")).toBe('

some 2 style and 1 class text

'); - }); }); })(); diff --git a/editions/tw5.com/tiddlers/system/doc-macros.tid b/editions/tw5.com/tiddlers/system/doc-macros.tid index a264198a9..d4c4b9506 100644 --- a/editions/tw5.com/tiddlers/system/doc-macros.tid +++ b/editions/tw5.com/tiddlers/system/doc-macros.tid @@ -117,7 +117,7 @@ This is an example tiddler. See [[Table-of-Contents Macros (Examples)]]. - +
Warning:
Don't do it this way!
Warning:
Don't do it this way!
$eg$ diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 17d3ebb39..9c4a342ff 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -290,11 +290,6 @@ kbd { color: <>; } -.tc-inline-style { - background: <>; - color: <>; -} - form.tc-form-inline { display: inline; }