MDL-49807 mod_wiki: section detection regexp fix
This commit is contained in:
committed by
David Monllao
parent
11e6e6c8e3
commit
ef126dbaff
@@ -74,7 +74,7 @@ class html_parser extends nwiki_parser {
|
||||
|
||||
$h1 = array("<\s*h{$minheaderlevel}\s*>", "<\/h{$minheaderlevel}>");
|
||||
|
||||
$regex = "/(.*?)({$h1[0]}\s*".preg_quote($header, '/')."\s*{$h1[1]}.*?)((?:\n{$h1[0]}.*)|$)/is";
|
||||
$regex = "/(.*?)({$h1[0]}\s*".preg_quote($header, '/')."\s*{$h1[1]}.*?)((?:{$h1[0]}.*)|$)/is";
|
||||
preg_match($regex, $text, $match);
|
||||
|
||||
if (!empty($match)) {
|
||||
|
||||
Reference in New Issue
Block a user