mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 17:23:00 +00:00
parser/table of contents: ensure [__TOC__] is on a line by itself
This commit is contained in:
parent
2b7add3f4f
commit
9a4467bc9f
1 changed files with 1 additions and 1 deletions
|
@ -1390,7 +1390,7 @@ class PeppermintParsedown extends ParsedownExtra
|
|||
// Indent? Don't even want to know
|
||||
if($fragment["indent"] > 0) return;
|
||||
// If it doesn't match, then we're not interested
|
||||
if(preg_match('/\[_*(?:TOC|toc)_*\]/u', $fragment["text"], $matches) !== 1)
|
||||
if(preg_match('/^\[_*(?:TOC|toc)_*\]$/u', $fragment["text"], $matches) !== 1)
|
||||
return;
|
||||
|
||||
$result = [
|
||||
|
|
Loading…
Reference in a new issue