From 7c5c80350ce1440312ab16bca5a12e934926eb47 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 17 Feb 2016 12:29:57 +0800 Subject: [PATCH] MDL-49807 mod_wiki: section detection regexp fix --- mod/wiki/parser/markups/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/wiki/parser/markups/html.php b/mod/wiki/parser/markups/html.php index 355c634991d..fc1545d931e 100644 --- a/mod/wiki/parser/markups/html.php +++ b/mod/wiki/parser/markups/html.php @@ -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)) { -- 2.43.0