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

Bugfix: Fix footnote rendering (thanks again, @SeanFromIT!)

This commit is contained in:
Starbeamrainbowlabs 2019-09-21 11:35:50 +01:00
parent c8aa3b8692
commit 8d9491cb55
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 4 additions and 2 deletions

View file

@ -337,7 +337,7 @@
"version": "0.10",
"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.",
"lastupdate": 1568296731,
"lastupdate": 1569062000,
"optional": false,
"extra_data": {
"Parsedown.php": "https:\/\/raw.githubusercontent.com\/erusev\/parsedown\/fe7a50eceb4a3c867cc9fa9c0aa906b1067d1955\/Parsedown.php",

View file

@ -281,6 +281,8 @@ class PeppermintParsedown extends ParsedownExtreme
*/
function __construct()
{
parent::__construct();
// Prioritise our internal link parsing over the regular link parsing
array_unshift($this->InlineTypes["["], "InternalLink");
// Prioritise our image parser over the regular image parser
@ -516,7 +518,7 @@ class PeppermintParsedown extends ParsedownExtreme
{
global $pageindex, $env;
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",;.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches)) {
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",;.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches) === 1) {
// 1: Parse parameters out
// -------------------------------
$link_page = trim($matches[1]);