kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fixed JavaScript line comments to be parsed as text runs
rodzic
c2927eb032
commit
537c0901e3
|
@ -56,15 +56,13 @@ JavaScriptParser.prototype.parse = function(type,code) {
|
||||||
element = "div";
|
element = "div";
|
||||||
classes.push("javascript-block-comment");
|
classes.push("javascript-block-comment");
|
||||||
content.push($tw.Tree.Text("/*"));
|
content.push($tw.Tree.Text("/*"));
|
||||||
|
content.push.apply(content,self.wiki.parseText("text/x-tiddlywiki",text).tree);
|
||||||
|
content.push($tw.Tree.Text("*/"));
|
||||||
} else {
|
} else {
|
||||||
element = "span";
|
element = "span";
|
||||||
classes.push("javascript-line-comment");
|
classes.push("javascript-line-comment");
|
||||||
content.push($tw.Tree.Text("//"));
|
content.push($tw.Tree.Text("//"));
|
||||||
}
|
content.push.apply(content,self.wiki.parseText("text/x-tiddlywiki-run",text).tree);
|
||||||
content.push.apply(content,self.wiki.parseText("text/x-tiddlywiki",text).tree);
|
|
||||||
if(comment.type === "Block") {
|
|
||||||
content.push($tw.Tree.Text("*/"));
|
|
||||||
} else {
|
|
||||||
content.push($tw.Tree.Text("\n"));
|
content.push($tw.Tree.Text("\n"));
|
||||||
}
|
}
|
||||||
result.push($tw.Tree.Element(element,{"class": classes},content));
|
result.push($tw.Tree.Element(element,{"class": classes},content));
|
||||||
|
|
Ładowanie…
Reference in New Issue