From 8ab12738cf446f169609fd1d6c23d50ec10c2310 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Sun, 9 Mar 2025 15:46:10 +0800 Subject: [PATCH] Revert DEBUG: render result and diff below body only on browser --- core/modules/filters/serializeparsetree.js | 29 ---------------------- core/ui/ViewTemplate/body/default.tid | 12 --------- 2 files changed, 41 deletions(-) delete mode 100644 core/modules/filters/serializeparsetree.js diff --git a/core/modules/filters/serializeparsetree.js b/core/modules/filters/serializeparsetree.js deleted file mode 100644 index 04796a2c9..000000000 --- a/core/modules/filters/serializeparsetree.js +++ /dev/null @@ -1,29 +0,0 @@ -/*\ -title: $:/core/modules/filters/serializeparsetree.js -type: application/javascript -module-type: filteroperator - -Filter operator for serializing JSON string of Abstract Syntax Tree (AST) of Wiki parse tree to a raw WikiText string. - -\*/ -(function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ -"use strict"; - -/* -Export our filter function -*/ -exports.serializeparsetree = function(source,operator,options) { - var results = []; - source(function(tiddler,title) { - var parseTreeObject = $tw.utils.parseJSONSafe(title); - if(parseTreeObject) { - results.push($tw.utils.serializeParseTree(parseTreeObject)); - } - }); - return results; -}; - -})(); diff --git a/core/ui/ViewTemplate/body/default.tid b/core/ui/ViewTemplate/body/default.tid index 1b8c3940c..5416c6e07 100644 --- a/core/ui/ViewTemplate/body/default.tid +++ b/core/ui/ViewTemplate/body/default.tid @@ -6,15 +6,3 @@ code-body: yes <$transclude tiddler="$:/language/MissingTiddler/Hint"/> -<%if [[$:/info/browser]text[yes]] %> - <$wikify text={{!!text}} name=parsetree output=parsetree > - <$let text2={{{[serializeparsetree[]]}}}> - <$wikify name=rendered text=<> output=html > - <$diff-text source={{!!text}} dest=<>/> - - <> - - - - -<%endif%> \ No newline at end of file