mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 05:22:59 +00:00
Don't include semicolons in greedy internal links
This commit is contained in:
parent
39098ac0fb
commit
c7d7de3d7e
5 changed files with 8 additions and 7 deletions
|
@ -34,6 +34,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
||||||
- Fixed the page history page - it should now display all page revisions in valid HTML
|
- Fixed the page history page - it should now display all page revisions in valid HTML
|
||||||
- Fixed another bug in the search context generator
|
- Fixed another bug in the search context generator
|
||||||
- Display an ellipsis at the beginning of a search context if it doesn't start at the beginning of a page
|
- Display an ellipsis at the beginning of a search context if it doesn't start at the beginning of a page
|
||||||
|
- Semicolons are no longer automatically included in greedy internal links.
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
- Password hashing has been overhauled! A totally new-and-different system is being used now, so you'll need to rehash all your passwords.
|
- Password hashing has been overhauled! A totally new-and-different system is being used now, so you'll need to rehash all your passwords.
|
||||||
|
|
|
@ -407,7 +407,7 @@ if($settings->sessionprefix == "auto")
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/** The version of Pepperminty Wiki currently running. */
|
/** The version of Pepperminty Wiki currently running. */
|
||||||
$version = "v0.17-dev";
|
$version = "v0.17-dev";
|
||||||
$commit = "24775724d14520b8007cf7f4cc0c1d8901980494";
|
$commit = "39098ac0fb92b0c206f6b3dcdf635c6cf15f110a";
|
||||||
/// Environment ///
|
/// Environment ///
|
||||||
/** Holds information about the current request environment. */
|
/** Holds information about the current request environment. */
|
||||||
$env = new stdClass();
|
$env = new stdClass();
|
||||||
|
@ -4892,8 +4892,8 @@ class search
|
||||||
{
|
{
|
||||||
if(in_array($qterm, static::$stop_words))
|
if(in_array($qterm, static::$stop_words))
|
||||||
continue;
|
continue;
|
||||||
// From http://stackoverflow.com/a/2483859/1460422
|
|
||||||
|
|
||||||
|
// From http://stackoverflow.com/a/2483859/1460422
|
||||||
$context = preg_replace("/" . preg_replace('/\\//u', "\/", preg_quote($qterm)) . "/iu", "<strong class='search-term-highlight'>$0</strong>", $context);
|
$context = preg_replace("/" . preg_replace('/\\//u', "\/", preg_quote($qterm)) . "/iu", "<strong class='search-term-highlight'>$0</strong>", $context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9106,7 +9106,7 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
{
|
{
|
||||||
global $pageindex, $env;
|
global $pageindex, $env;
|
||||||
|
|
||||||
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
|
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",;.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
|
||||||
{
|
{
|
||||||
$linkPage = trim($matches[1]);
|
$linkPage = trim($matches[1]);
|
||||||
$display = $linkPage . trim($matches[2]);
|
$display = $linkPage . trim($matches[2]);
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
|
"description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
|
||||||
"id": "feature-search",
|
"id": "feature-search",
|
||||||
"lastupdate": 1538224279,
|
"lastupdate": 1538236301,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -275,7 +275,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": 1530474936,
|
"lastupdate": 1538260745,
|
||||||
"optional": false
|
"optional": false
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -1013,8 +1013,8 @@ class search
|
||||||
{
|
{
|
||||||
if(in_array($qterm, static::$stop_words))
|
if(in_array($qterm, static::$stop_words))
|
||||||
continue;
|
continue;
|
||||||
// From http://stackoverflow.com/a/2483859/1460422
|
|
||||||
|
|
||||||
|
// From http://stackoverflow.com/a/2483859/1460422
|
||||||
$context = preg_replace("/" . preg_replace('/\\//u', "\/", preg_quote($qterm)) . "/iu", "<strong class='search-term-highlight'>$0</strong>", $context);
|
$context = preg_replace("/" . preg_replace('/\\//u', "\/", preg_quote($qterm)) . "/iu", "<strong class='search-term-highlight'>$0</strong>", $context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,7 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
{
|
{
|
||||||
global $pageindex, $env;
|
global $pageindex, $env;
|
||||||
|
|
||||||
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
|
if(preg_match('/^\[\[([^\]]*)\]\]([^\s!?",;.()\[\]{}*=+\/]*)/u', $fragment["text"], $matches))
|
||||||
{
|
{
|
||||||
$linkPage = trim($matches[1]);
|
$linkPage = trim($matches[1]);
|
||||||
$display = $linkPage . trim($matches[2]);
|
$display = $linkPage . trim($matches[2]);
|
||||||
|
|
Loading…
Reference in a new issue