mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +00:00
Fix text parser to use codeblocks
This means that JavaScript and JSON tiddlers will be properly highlighted if the highlight plugin is loaded.
This commit is contained in:
parent
d727046948
commit
552657fc58
@ -15,11 +15,11 @@ The plain text parser processes blocks of source text into a degenerate parse tr
|
|||||||
var TextParser = function(type,text,options) {
|
var TextParser = function(type,text,options) {
|
||||||
this.tree = [{
|
this.tree = [{
|
||||||
type: "element",
|
type: "element",
|
||||||
tag: "pre",
|
tag: "$codeblock",
|
||||||
children: [{
|
attributes: {
|
||||||
type: "text",
|
code: {type: "string", value: text},
|
||||||
text: text
|
language: {type: "string", value: type}
|
||||||
}]
|
}
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user