From c4d0cc42d7a3ffbe1530b07280e4f0f690928807 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 23 May 2020 20:40:30 +0100 Subject: [PATCH] parser: make internal link syntax non-greedy. Why the heck was it working before? I guess we'll never know...... --- modules/parser-parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/parser-parsedown.php b/modules/parser-parsedown.php index 82caa69..01e428a 100644 --- a/modules/parser-parsedown.php +++ b/modules/parser-parsedown.php @@ -918,7 +918,7 @@ class PeppermintParsedown extends ParsedownExtra { global $pageindex, $env; - if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",;.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches) === 1) { + if(preg_match('/^\[\[([^\]]*?)\]\]([^\s!?",;.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches) === 1) { // 1: Parse parameters out // ------------------------------- $link_page = str_replace(["\r", "\n"], [" ", " "], trim($matches[1]));