From cdf3e101a832c7b419f1814f70c727fa9ee09bbd Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 17 Mar 2014 20:55:08 +0000 Subject: [PATCH] Fix crash with headings `this.match[1].length` can get overwritten when we parse the content of the heading --- core/modules/parsers/wikiparser/rules/heading.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/parsers/wikiparser/rules/heading.js b/core/modules/parsers/wikiparser/rules/heading.js index 1423fcae2..de4e45c27 100644 --- a/core/modules/parsers/wikiparser/rules/heading.js +++ b/core/modules/parsers/wikiparser/rules/heading.js @@ -36,7 +36,7 @@ exports.parse = function() { // Return the heading return [{ type: "element", - tag: "h" + this.match[1].length, + tag: "h" + headingLevel, attributes: { "class": {type: "string", value: classes.join(" ")} },