mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-07 22:33:50 +00:00
Revert DEBUG: render result and diff below body only on browser
This commit is contained in:
parent
74c9841901
commit
8ab12738cf
@ -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;
|
|
||||||
};
|
|
||||||
|
|
||||||
})();
|
|
@ -6,15 +6,3 @@ code-body: yes
|
|||||||
<$transclude tiddler="$:/language/MissingTiddler/Hint"/>
|
<$transclude tiddler="$:/language/MissingTiddler/Hint"/>
|
||||||
|
|
||||||
</$transclude>
|
</$transclude>
|
||||||
<%if [[$:/info/browser]text[yes]] %>
|
|
||||||
<$wikify text={{!!text}} name=parsetree output=parsetree >
|
|
||||||
<$let text2={{{[<parsetree>serializeparsetree[]]}}}>
|
|
||||||
<$wikify name=rendered text=<<text2>> output=html >
|
|
||||||
<$diff-text source={{!!text}} dest=<<text2>>/>
|
|
||||||
|
|
||||||
<<rendered>>
|
|
||||||
|
|
||||||
</$wikify>
|
|
||||||
</$let>
|
|
||||||
</$wikify>
|
|
||||||
<%endif%>
|
|
Loading…
x
Reference in New Issue
Block a user