diff --git a/plugins/tiddlywiki/internals/editpreviews/parse-tree.tid b/plugins/tiddlywiki/internals/editpreviews/parse-tree.tid index 205ef7cae..aafa30ecf 100644 --- a/plugins/tiddlywiki/internals/editpreviews/parse-tree.tid +++ b/plugins/tiddlywiki/internals/editpreviews/parse-tree.tid @@ -3,121 +3,13 @@ tags: $:/tags/EditPreview list-after: $:/core/ui/EditTemplate/body/preview/output caption: parse tree -\whitespace trim - -\procedure preview-node-properties(node) -<$let excludeProperties="text type tag children attributes orderedAttributes"> -<$list filter="[jsonindexes[]] -[subfilter] +[limit[1]]" variable="ignore"> - - -<$list filter="[jsonindexes[]] -[subfilter] +[sort[]]" variable="index"> - - - - - - -
-<$text text=<>/> - -<$text text={{{ [jsonget] }}}/> -
- - -\end - -\procedure preview-node-attribute-string(attribute) -<$text text={{{ [jsonget[value]] }}}/> -\end - -\procedure preview-node-attribute-indirect(attribute) -{{<$text text={{{ [jsonget[textReference]] }}}/>}} -\end - -\procedure preview-node-attribute-macro(attribute) -<< -<$text text={{{ [jsonget[value],[name]] }}}/> -<$list filter="[jsonindexes[value],[params]]" variable="index"> -  -<$list filter="[jsonget[value],[params],,[name]]" variable="ignore"> -<$text text={{{ [jsonget[value],[params],,[name]] }}}/> -: - -<$text text={{{ [jsonget[value],[params],,[value]] }}}/> - ->> -\end - -\procedure preview-node-attributes(node) -<$list filter="[jsonindexes[attributes]limit[1]]" variable="ignore"> - - -<$list filter="[jsonindexes[attributes]sort[]]" variable="index"> - - - - - - -
-<$text text=<>/> - -<$let type={{{ [jsonget[attributes],,[type]] }}}> -<$transclude $variable={{{ [match[string]then[preview-node-attribute-string]] :else[match[indirect]then[preview-node-attribute-indirect]] :else[match[macro]then[preview-node-attribute-macro]] }}} attribute={{{ [jsonget[attributes],] }}}/> - -
- -\end - -\procedure preview-node-children(node) -
-<$transclude $variable="preview-node-properties" node=<>/> -<$transclude $variable="preview-node-attributes" node=<>/> -<$transclude $variable="preview-node-list" nodeList={{{ [jsonget[children]] }}}/> -
-\end - -\procedure preview-node-title-widget(node) -
-
-<$<$text text={{{ [jsonget[type]] }}}/>> -
-<$transclude $variable="preview-node-children" node=<>/> -
-\end - -\procedure preview-node-title-element(node) -
-
-<<$text text={{{ [jsonget[tag]] }}}/>> -
-<$transclude $variable="preview-node-children" node=<>/> -
-\end - -\procedure preview-node-title-text(node) -
-
-"<$text text={{{ [jsonget[text]] }}}/>" -
-
-\end - -\procedure preview-node(node) -<$let type={{{ [jsonget[type]] }}}> -<$transclude $variable={{{ [match[element]then[preview-node-title-element]] :else[match[text]then[preview-node-title-text]] :else[[preview-node-title-widget]] }}} node=<>/> - -\end - -\procedure preview-node-list(nodeList) -<$list filter="[jsonindexes[]]" variable="index"> -<$transclude $variable="preview-node" node={{{ [jsonget] }}}/> - -\end - -\procedure preview(mode) -<$wikify name="preview-json" text={{!!text}} type={{!!type}} mode=<> output="parsetree"> -<$transclude $variable="preview-node-list" nodeList=<>/> +\define preview(mode) +<$wikify name="preview-text" text={{!!text}} type={{!!type}} mode="$mode$" output="parsetree"> +
+
+<$text text=<>/>
+
+
\end