From 0e5ca19c3c0bbcb0b4b2da35446c46cd8bcd6d85 Mon Sep 17 00:00:00 2001 From: pmario Date: Sun, 15 Mar 2026 23:04:44 +0100 Subject: [PATCH] Fix regex for code block end detection in wikiparser --- core/modules/parsers/wikiparser/rules/codeblock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/parsers/wikiparser/rules/codeblock.js b/core/modules/parsers/wikiparser/rules/codeblock.js index 1171704b37..97be2aa92a 100644 --- a/core/modules/parsers/wikiparser/rules/codeblock.js +++ b/core/modules/parsers/wikiparser/rules/codeblock.js @@ -25,7 +25,7 @@ exports.init = function(parser) { }; exports.parse = function() { - var reEnd = /(\r?\n```$)/mg; + var reEnd = /(\r?\n)?```$/mg; var languageStart = this.parser.pos + 3, languageEnd = languageStart + this.match[1].length; // Move past the match