mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-10-26 17:44:27 +00:00
Fixed JavaScript line comments to be parsed as text runs
This commit is contained in:
1 parent
c2927eb032
commit
537c0901e3
1 file changed
+3
-5
@@ -56,15 +56,13 @@ JavaScriptParser.prototype.parse = function(type,code) {
|
||||
element = "div";
|
||||
classes.push("javascript-block-comment");
|
||||
content.push($tw.Tree.Text("/*"));
|
||||
content.push.apply(content,self.wiki.parseText("text/x-tiddlywiki",text).tree);
|
||||
content.push($tw.Tree.Text("*/"));
|
||||
} else {
|
||||
element = "span";
|
||||
classes.push("javascript-line-comment");
|
||||
content.push($tw.Tree.Text("//"));
|
||||
}
|
||||
content.push.apply(content,self.wiki.parseText("text/x-tiddlywiki",text).tree);
|
||||
if(comment.type === "Block") {
|
||||
content.push($tw.Tree.Text("*/"));
|
||||
} else {
|
||||
content.push.apply(content,self.wiki.parseText("text/x-tiddlywiki-run",text).tree);
|
||||
content.push($tw.Tree.Text("\n"));
|
||||
}
|
||||
result.push($tw.Tree.Element(element,{"class": classes},content));
|
||||
|
||||
Reference in new issue
Block a user