mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
Added the broken bar character (¦) as an alternative internal link / template splitting character.
This commit is contained in:
parent
4f61da53b2
commit
31999e2627
3 changed files with 7 additions and 7 deletions
|
@ -5060,7 +5060,7 @@ class PeppermintParsedown extends ParsedownExtra
|
|||
global $pageindex, $env;
|
||||
|
||||
|
||||
$parts = explode("|", trim($source, "{}"));
|
||||
$parts = preg_split("/\\||¦/", trim($source, "{}"));
|
||||
$parts = array_map("trim", $parts);
|
||||
|
||||
// Extract the name of the template page
|
||||
|
@ -5120,10 +5120,10 @@ class PeppermintParsedown extends ParsedownExtra
|
|||
if(preg_match('/^\[\[([^\]]*)\]\]/', $fragment["text"], $matches))
|
||||
{
|
||||
$display = $linkPage = trim($matches[1]);
|
||||
if(strpos($matches[1], "|"))
|
||||
if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false)
|
||||
{
|
||||
// We have a bar character
|
||||
$parts = explode("|", $matches[1], 2);
|
||||
$parts = preg_split("/\\||¦/", $matches[1], 2);
|
||||
$linkPage = trim($parts[0]); // The page to link to
|
||||
$display = trim($parts[1]); // The text to display
|
||||
}
|
|
@ -203,7 +203,7 @@
|
|||
"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": 1471777331,
|
||||
"lastupdate": 1471854920,
|
||||
"optional": false
|
||||
}
|
||||
]
|
|
@ -245,7 +245,7 @@ class PeppermintParsedown extends ParsedownExtra
|
|||
global $pageindex, $env;
|
||||
|
||||
|
||||
$parts = explode("|", trim($source, "{}"));
|
||||
$parts = preg_split("/\\||¦/", trim($source, "{}"));
|
||||
$parts = array_map("trim", $parts);
|
||||
|
||||
// Extract the name of the template page
|
||||
|
@ -305,10 +305,10 @@ class PeppermintParsedown extends ParsedownExtra
|
|||
if(preg_match('/^\[\[([^\]]*)\]\]/', $fragment["text"], $matches))
|
||||
{
|
||||
$display = $linkPage = trim($matches[1]);
|
||||
if(strpos($matches[1], "|"))
|
||||
if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false)
|
||||
{
|
||||
// We have a bar character
|
||||
$parts = explode("|", $matches[1], 2);
|
||||
$parts = preg_split("/\\||¦/", $matches[1], 2);
|
||||
$linkPage = trim($parts[0]); // The page to link to
|
||||
$display = trim($parts[1]); // The text to display
|
||||
}
|
Loading…
Reference in a new issue