* \s matches the trim on the line.
* Since leading space is ok for table start tags, and you can use them
in ":" context, you should be able to compose the two together.
Bug: T105238
Change-Id: Id08e24e5dd2bb8ca09453adec87b21225df4a840
$first_two = substr( $line, 0, 2 );
$matches = array();
- if ( preg_match( '/^(:*)\{\|(.*)$/', $line, $matches ) ) {
+ if ( preg_match( '/^(:*)\s*\{\|(.*)$/', $line, $matches ) ) {
# First check if we are starting a new table
$indent_level = strlen( $matches[1] );
</tr></table></dd></dl></dd></dl>
!! end
-# Bug 52473
+# The trailing whitespace in this test is to catch a regression in
+# Parsoid after T54473.
!! test
Definition Lists: Hacky use to indent tables (WS-insensitive)
-!! options
-parsoid
!! wikitext
: {|
|a
|}
-!! html
-<dl>
-<dd> <table><tr><td>a</td></tr></table> </dd>
-</dl>
+!! html/php
+<dl><dd><table>
+<tr>
+<td>a
+</td></tr></table></dd></dl>
+
+!! html/parsoid
+<dl><dd> <table>
+<tbody><tr><td>a</td></tr>
+</tbody></table> </dd></dl>
!! end
+
## The PHP parser treats : items (dd) without a corresponding ; item (dt)
## as an empty dt item. It also ignores all but the last ";" when followed
## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in