Commit 7c5c8035 authored by Marina Glancy's avatar Marina Glancy Committed by David Monllaó

MDL-49807 mod_wiki: section detection regexp fix

parent a6f4866e
......@@ -73,7 +73,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)) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment