mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Bugfix: Include the rest of a word in internal links.
This commit is contained in:
parent
1f92578030
commit
b693953a5c
4 changed files with 8 additions and 7 deletions
|
@ -19,6 +19,7 @@
|
||||||
- Added the `user_page_prefix` setting to allow customisation of where user pages should be located. Default value: `Users`
|
- Added the `user_page_prefix` setting to allow customisation of where user pages should be located. Default value: `Users`
|
||||||
- [Module API] Added `get_user_pagename()` and `extract_user_from_userpage()` to allo programatic detection etc.
|
- [Module API] Added `get_user_pagename()` and `extract_user_from_userpage()` to allo programatic detection etc.
|
||||||
- Added a `user-list` action that, well, outputs a list of users. Includes links to their respective user pages (though redlinks aren't implemented here yet).
|
- Added a `user-list` action that, well, outputs a list of users. Includes links to their respective user pages (though redlinks aren't implemented here yet).
|
||||||
|
- Internal links like `[[Page name]]s` will now link to the correct page in include the rest of the word. Note that this functionality _can't_ be mixed with displayy text, like this: `[[Page name|Display text]]s` - the rest of the word will be silently ignored in the link!
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Overhauled internal history logic - history logic is now done in core.
|
- Overhauled internal history logic - history logic is now done in core.
|
||||||
|
@ -34,7 +35,7 @@
|
||||||
- Recent changes made on different days are now displayed separately, as they should be (#112)
|
- Recent changes made on different days are now displayed separately, as they should be (#112)
|
||||||
- Always display footer message at the bottom of the page.
|
- Always display footer message at the bottom of the page.
|
||||||
- Trim the image url before short image url detection (#108)
|
- Trim the image url before short image url detection (#108)
|
||||||
- Fxed huge issue with `contentonly` display mode.
|
- Fixed huge issue with `contentonly` display mode.
|
||||||
- Improved the search engine indexing algorithm. It now shouldn't choke on certain special characters (`[]{}|`) and will treat them as word boundaries.
|
- Improved the search engine indexing algorithm. It now shouldn't choke on certain special characters (`[]{}|`) and will treat them as word boundaries.
|
||||||
- Fixed tag links at the bottom of pages for tags with a single quote (`'`) in them.
|
- Fixed tag links at the bottom of pages for tags with a single quote (`'`) in them.
|
||||||
- Correct error message when attempting to move a page
|
- Correct error message when attempting to move a page
|
||||||
|
|
|
@ -5967,9 +5967,9 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
{
|
{
|
||||||
global $pageindex, $env;
|
global $pageindex, $env;
|
||||||
|
|
||||||
if(preg_match('/^\[\[([^\]]*)\]\]/', $fragment["text"], $matches))
|
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
|
||||||
{
|
{
|
||||||
$display = $linkPage = trim($matches[1]);
|
$display = $linkPage = trim($matches[1]) . trim($matches[2]);
|
||||||
if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false)
|
if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false)
|
||||||
{
|
{
|
||||||
// We have a bar character
|
// We have a bar character
|
||||||
|
|
|
@ -239,7 +239,7 @@
|
||||||
"author": "Emanuil Rusev & Starbeamrainbowlabs",
|
"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.",
|
"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",
|
"id": "parser-parsedown",
|
||||||
"lastupdate": 1483388764,
|
"lastupdate": 1488019684,
|
||||||
"optional": false
|
"optional": false
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Parsedown",
|
"name" => "Parsedown",
|
||||||
"version" => "0.9.7",
|
"version" => "0.9.8",
|
||||||
"author" => "Emanuil Rusev & Starbeamrainbowlabs",
|
"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.",
|
"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",
|
"id" => "parser-parsedown",
|
||||||
|
@ -315,9 +315,9 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
{
|
{
|
||||||
global $pageindex, $env;
|
global $pageindex, $env;
|
||||||
|
|
||||||
if(preg_match('/^\[\[([^\]]*)\]\]/', $fragment["text"], $matches))
|
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
|
||||||
{
|
{
|
||||||
$display = $linkPage = trim($matches[1]);
|
$display = $linkPage = trim($matches[1]) . trim($matches[2]);
|
||||||
if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false)
|
if(strpos($matches[1], "|") !== false || strpos($matches[1], "¦") !== false)
|
||||||
{
|
{
|
||||||
// We have a bar character
|
// We have a bar character
|
||||||
|
|
Loading…
Reference in a new issue