1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-26 02:55:02 +00:00

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

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