From b9299309cc9da8885c1b09615f14d7d651d8c0c7 Mon Sep 17 00:00:00 2001 From: Tobias Beer Date: Sat, 8 Oct 2016 14:44:30 +0200 Subject: [PATCH] Fixes #2076 single line macros shouldn't need terminating line break --- core/modules/parsers/wikiparser/rules/macrodef.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/parsers/wikiparser/rules/macrodef.js b/core/modules/parsers/wikiparser/rules/macrodef.js index 1a0f34e01..daf854cab 100644 --- a/core/modules/parsers/wikiparser/rules/macrodef.js +++ b/core/modules/parsers/wikiparser/rules/macrodef.js @@ -61,7 +61,7 @@ exports.parse = function() { reEnd = /(\r?\n\\end[^\S\n\r]*(?:$|\r?\n))/mg; } else { // Otherwise, the end of the definition is marked by the end of the line - reEnd = /(\r?\n)/mg; + reEnd = /($|\r?\n)/mg; // Move past any whitespace this.parser.pos = $tw.utils.skipWhiteSpace(this.parser.source,this.parser.pos); }