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

Monkeypatch new internal link logic

This commit is contained in:
Starbeamrainbowlabs 2017-03-09 10:47:25 +00:00
parent a1516d9830
commit e0cedbf9b7
3 changed files with 8 additions and 6 deletions

View file

@ -5675,7 +5675,7 @@ register_module([
register_module([
"name" => "Parsedown",
"version" => "0.9.8",
"version" => "0.9.9",
"author" => "Emanuil Rusev & Starbeamrainbowlabs",
"description" => "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.",
"id" => "parser-parsedown",
@ -5991,7 +5991,8 @@ class PeppermintParsedown extends ParsedownExtra
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
{
$display = $linkPage = trim($matches[1]) . trim($matches[2]);
$linkPage = trim($matches[1]);
$display = $linkPage . trim($matches[2]);
if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false)
{
// We have a bar character

View file

@ -235,11 +235,11 @@
},
{
"name": "Parsedown",
"version": "0.9.8",
"version": "0.9.9",
"author": "Emanuil Rusev & Starbeamrainbowlabs",
"description": "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https:\/\/github.com\/erusev\/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.",
"id": "parser-parsedown",
"lastupdate": 1488019975,
"lastupdate": 1489056285,
"optional": false
}
]

View file

@ -1,7 +1,7 @@
<?php
register_module([
"name" => "Parsedown",
"version" => "0.9.8",
"version" => "0.9.9",
"author" => "Emanuil Rusev & Starbeamrainbowlabs",
"description" => "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.",
"id" => "parser-parsedown",
@ -317,7 +317,8 @@ class PeppermintParsedown extends ParsedownExtra
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
{
$display = $linkPage = trim($matches[1]) . trim($matches[2]);
$linkPage = trim($matches[1]);
$display = $linkPage . trim($matches[2]);
if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false)
{
// We have a bar character