parser: make internal link syntax non-greedy. Why the heck was it working before?

I guess we'll never know......
This commit is contained in:
Starbeamrainbowlabs 2020-05-23 20:40:30 +01:00
parent 48567a96a8
commit c4d0cc42d7
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 1 additions and 1 deletions

View File

@ -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]));