mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-01 03:26:28 +00:00
ffd680ee7f
The issue occurred when replying to a comment consisting of multiple list items, starting with a <dt> (instead of the expected <dd>), so that the comment is considered to be unindented. Modifier tried to add the reply directly inside the list (<dl>) rather than inside the last list item (<dt>), which caused it to be confused about indentation levels and try to un-indent more times than there were indentations. The simplest solution, given the existing code, is to add the reply outside the list instead, in a new list. This results in a "list gap" (<dl><dt>...</dt><dd>...</dd></dl><dl><dd>...</dd></dl>), but I think it's acceptable for this rare case. There are separate tests cases for old Parser and for Parsoid HTML, because they parse the original wikitext differently (with the old Parser producing HTML with a list gap too). Bug: T279445 Change-Id: Ie0ee960e7090cf051ee547b480c980e9530eda51
108 lines
3.8 KiB
JSON
108 lines
3.8 KiB
JSON
[
|
|
{
|
|
"name": "plwiki oldparser",
|
|
"dom": "cases/pl-big-oldparser/pl-big-oldparser.html",
|
|
"expected": "cases/pl-big-oldparser/pl-big-oldparser-modified.html",
|
|
"config": "../data/plwiki-config.json",
|
|
"data": "../data/plwiki-data.json"
|
|
},
|
|
{
|
|
"name": "plwiki parsoid",
|
|
"dom": "cases/pl-big-parsoid/pl-big-parsoid.html",
|
|
"expected": "cases/pl-big-parsoid/pl-big-parsoid-modified.html",
|
|
"config": "../data/plwiki-config.json",
|
|
"data": "../data/plwiki-data.json"
|
|
},
|
|
{
|
|
"name": "enwiki oldparser",
|
|
"dom": "cases/en-big-oldparser/en-big-oldparser.html",
|
|
"expected": "cases/en-big-oldparser/en-big-oldparser-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "enwiki parsoid",
|
|
"dom": "cases/en-big-parsoid/en-big-parsoid.html",
|
|
"expected": "cases/en-big-parsoid/en-big-parsoid-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "arwiki no-paragraph oldparser",
|
|
"dom": "cases/ar-no-paragraph-oldparser/ar-no-paragraph-oldparser.html",
|
|
"expected": "cases/ar-no-paragraph-oldparser/ar-no-paragraph-oldparser-modified.html",
|
|
"config": "../data/arwiki-config.json",
|
|
"data": "../data/arwiki-data.json"
|
|
},
|
|
{
|
|
"name": "arwiki no-paragraph parsoid",
|
|
"dom": "cases/ar-no-paragraph-parsoid/ar-no-paragraph-parsoid.html",
|
|
"expected": "cases/ar-no-paragraph-parsoid/ar-no-paragraph-parsoid-modified.html",
|
|
"config": "../data/arwiki-config.json",
|
|
"data": "../data/arwiki-data.json"
|
|
},
|
|
{
|
|
"name": "Accidental dt tags (old parser)",
|
|
"dom": "cases/dt-tags-oldparser/dt-tags-oldparser.html",
|
|
"expected": "cases/dt-tags-oldparser/dt-tags-oldparser-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "Accidental dt tags (Parsoid)",
|
|
"dom": "cases/dt-tags-parsoid/dt-tags-parsoid.html",
|
|
"expected": "cases/dt-tags-parsoid/dt-tags-parsoid-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "Must split a list to reply to one of the comments",
|
|
"dom": "cases/split-list/split-list.html",
|
|
"expected": "cases/split-list/split-list-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "Must split a list to reply to one of the comments (version 2)",
|
|
"dom": "cases/split-list2/split-list2.html",
|
|
"expected": "cases/split-list2/split-list2-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "Replies to comments with mixed indentation",
|
|
"dom": "cases/mixed-indentation/mixed-indentation.html",
|
|
"expected": "cases/mixed-indentation/mixed-indentation-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "Mess caused by unclosed <font> tags in wikitext",
|
|
"dom": "cases/unclosed-font/unclosed-font.html",
|
|
"expected": "cases/unclosed-font/unclosed-font-modified.html",
|
|
"config": "../data/nlwiki-config.json",
|
|
"data": "../data/nlwiki-data.json"
|
|
},
|
|
{
|
|
"name": "Reply inserted inside/outside various wrapper elements",
|
|
"dom": "cases/wrappers/wrappers.html",
|
|
"expected": "cases/wrappers/wrappers-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "Signatures in funny places",
|
|
"dom": "cases/signatures-funny/signatures-funny.html",
|
|
"expected": "cases/signatures-funny/signatures-funny-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
},
|
|
{
|
|
"name": "HTML comments after signatures",
|
|
"dom": "cases/signatures-comments/signatures-comments.html",
|
|
"expected": "cases/signatures-comments/signatures-comments-modified.html",
|
|
"config": "../data/enwiki-config.json",
|
|
"data": "../data/enwiki-data.json"
|
|
}
|
|
]
|