mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
Added support for hacky use of dl before tables.
* This is the equivalent of commit a0746946 to core/includes/Parser.php Change-Id: Id093e39dabad29cb275bd21325d39bfeb7709d98
This commit is contained in:
parent
f43f2d61c8
commit
c5f9961423
|
@ -1435,7 +1435,7 @@ block_tag
|
|||
/*********************************************************
|
||||
* Lists
|
||||
*********************************************************/
|
||||
lists = (dtdd / li) (sol (dtdd / li))*
|
||||
lists = (dtdd / hacky_dl_uses / li) (sol (dtdd / hacky_dl_uses / li))*
|
||||
|
||||
li = bullets:list_char+
|
||||
c:inlineline?
|
||||
|
@ -1448,6 +1448,26 @@ li = bullets:list_char+
|
|||
return [ li, c ];
|
||||
}
|
||||
|
||||
/*
|
||||
* This production is required to support wikitext of this form
|
||||
* ::{|border="1"|foo|bar|baz|}
|
||||
* where the leading colons are used to indent the entire table.
|
||||
* This hack was added back in 2006 in commit
|
||||
* a0746946312b0f1eda30a2c793f5f7052e8e5f3a based on a patch by Carl
|
||||
* Fürstenberg.
|
||||
*/
|
||||
hacky_dl_uses = bullets:":"+
|
||||
c:table_lines
|
||||
&eolf
|
||||
{
|
||||
if ( c === '' )
|
||||
c = [];
|
||||
var li = new TagTk( 'listItem', [], { tsr: [pos0, pos0 + bullets.length] } );
|
||||
li.bullets = bullets;
|
||||
return [ li, c ];
|
||||
}
|
||||
|
||||
|
||||
dtdd
|
||||
= bullets:(!(";" !list_char) lc:list_char { return lc })*
|
||||
";"
|
||||
|
|
Loading…
Reference in a new issue