MDL-49807 mod_wiki: section detection regexp fix

This commit is contained in:
Marina Glancy
2016-02-17 13:11:20 +08:00
committed by David Monllao
parent 11e6e6c8e3
commit ef126dbaff
+1 -1
View File
@@ -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)) {