From cde03baf24a7c561510b09871ca641bdfba0fe76 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 9 Jun 2012 22:25:31 +0100 Subject: [PATCH] Take newlines out of JS comments --- core/modules/parsers/javascriptparser/javascriptparser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/modules/parsers/javascriptparser/javascriptparser.js b/core/modules/parsers/javascriptparser/javascriptparser.js index 89724711e..eda931c81 100644 --- a/core/modules/parsers/javascriptparser/javascriptparser.js +++ b/core/modules/parsers/javascriptparser/javascriptparser.js @@ -62,6 +62,7 @@ JavaScriptParser.prototype.parse = function(type,code) { element = "span"; classes.push("javascript-line-comment"); content.push($tw.Tree.Text("//")); + text = text.replace(/\r?\n/mg,""); content.push.apply(content,self.wiki.parseText("text/x-tiddlywiki-run",text).tree); content.push($tw.Tree.Text("\n")); }