diff --git a/core/modules/parsers/wikiparser/rules/commentblock.js b/core/modules/parsers/wikiparser/rules/commentblock.js index 997be818c..5f87020ca 100644 --- a/core/modules/parsers/wikiparser/rules/commentblock.js +++ b/core/modules/parsers/wikiparser/rules/commentblock.js @@ -53,11 +53,10 @@ exports.parse = function() { // Return a node representing the comment that is not rendered var commentStart = this.match.index; var commentEnd = this.endMatch.index + this.endMatch[0].length; - var commentText = this.parser.source.slice(commentStart, commentEnd); return [{ type: "void", children: [], - text: commentText, + text: this.parser.source.slice(commentStart, commentEnd), start: commentStart, end: commentEnd }]; diff --git a/core/modules/parsers/wikiparser/rules/commentinline.js b/core/modules/parsers/wikiparser/rules/commentinline.js index f39d9f6ff..b96f5d78b 100644 --- a/core/modules/parsers/wikiparser/rules/commentinline.js +++ b/core/modules/parsers/wikiparser/rules/commentinline.js @@ -46,10 +46,9 @@ exports.parse = function() { // Return a node representing the inline comment var commentStart = this.match.index; var commentEnd = this.endMatch.index + this.endMatch[0].length; - var commentText = this.parser.source.slice(commentStart, commentEnd); return [{ type: "void", - text: commentText, + text: this.parser.source.slice(commentStart, commentEnd), start: commentStart, end: commentEnd }];