diff --git a/source/Ox.UI/js/Code/Ox.SourceViewer.js b/source/Ox.UI/js/Code/Ox.SourceViewer.js index d9f0cfbc..fc1b9797 100644 --- a/source/Ox.UI/js/Code/Ox.SourceViewer.js +++ b/source/Ox.UI/js/Code/Ox.SourceViewer.js @@ -36,16 +36,16 @@ Ox.SourceViewer = function(options, self) { Ox.tokenize(source).forEach(function(token, i) { var text = source.substr(token.offset, token.length), type = token.type == 'comment' ? 'comment' : 'code'; - if (type == 'comment') { - i && sections.push({comment: '', code: ''}); - text = /^\/\*/.test(text) - ? Ox.sub(text, 2, -2) - : Ox.sub(text, 2); - self.options.replaceComment.forEach(function(replace) { - text = text.replace(replace[0], replace[1]); - }); + if (!/^\/\//.test(text)) { + if (type == 'comment') { + i && sections.push({comment: '', code: ''}); + text = Ox.sub(text, 2, -2); + self.options.replaceComment.forEach(function(replace) { + text = text.replace(replace[0], replace[1]); + }); + } + Ox.last(sections)[type] += text; } - Ox.last(sections)[type] += text; }); sections.forEach(function(section) { var $section = $('')