From 1f907d500a257a8af6b7d67072843a1ab4d3becf Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Thu, 19 Apr 2018 20:00:57 -0400 Subject: [PATCH] Cleanup the element matches in doBlockLevels a bit The MARKER_PREFIX is removed since `unstripGeneral()` happens before we get here. Change-Id: Ic668784fd8bbaa8395cd5449c83a993abda141eb --- includes/parser/BlockLevelPass.php | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/includes/parser/BlockLevelPass.php b/includes/parser/BlockLevelPass.php index 1173dd2086..c3669032d3 100644 --- a/includes/parser/BlockLevelPass.php +++ b/includes/parser/BlockLevelPass.php @@ -291,19 +291,34 @@ class BlockLevelPass { if ( 0 == $prefixLength ) { # No prefix (not in list)--go to paragraph mode # @todo consider using a stack for nestable elements like span, table and div + + // P-wrapping and indent-pre are suppressed inside, not outside + $blockElems = 'table|h1|h2|h3|h4|h5|h6|pre|p|ul|ol|dl|li'; + // P-wrapping and indent-pre are suppressed outside, not inside + $antiBlockElems = 'td|th'; + $openMatch = preg_match( - '/(?: tag, or if -- 2.20.1