From ffd680ee7f711ddacb1048d95f3614df5b653734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 21 Apr 2021 11:31:10 +0200 Subject: [PATCH] Fix adding comments in lists containing
tags The issue occurred when replying to a comment consisting of multiple list items, starting with a
(instead of the expected
), so that the comment is considered to be unindented. Modifier tried to add the reply directly inside the list (
) rather than inside the last list item (
), 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" (
...
...
...
), 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 --- extension.json | 6 + includes/CommentModifier.php | 13 +- modules/modifier.js | 13 +- tests/cases/comments.json | 14 ++ .../dt-tags-oldparser-modified.html | 39 ++++ .../dt-tags-oldparser/dt-tags-oldparser.html | 39 ++++ .../dt-tags-oldparser/dt-tags-oldparser.json | 185 ++++++++++++++++++ .../cases/dt-tags-oldparser/dt-tags.wikitext | 12 ++ .../dt-tags-parsoid-modified.html | 13 ++ .../dt-tags-parsoid/dt-tags-parsoid.html | 13 ++ .../dt-tags-parsoid/dt-tags-parsoid.json | 185 ++++++++++++++++++ tests/cases/modified.json | 14 ++ 12 files changed, 544 insertions(+), 2 deletions(-) create mode 100644 tests/cases/dt-tags-oldparser/dt-tags-oldparser-modified.html create mode 100644 tests/cases/dt-tags-oldparser/dt-tags-oldparser.html create mode 100644 tests/cases/dt-tags-oldparser/dt-tags-oldparser.json create mode 100644 tests/cases/dt-tags-oldparser/dt-tags.wikitext create mode 100644 tests/cases/dt-tags-parsoid/dt-tags-parsoid-modified.html create mode 100644 tests/cases/dt-tags-parsoid/dt-tags-parsoid.html create mode 100644 tests/cases/dt-tags-parsoid/dt-tags-parsoid.json diff --git a/extension.json b/extension.json index 2b57b5021..2f987446c 100644 --- a/extension.json +++ b/extension.json @@ -279,6 +279,8 @@ "cases/it-unsigned-parsoid/it-unsigned-parsoid-transcludedFrom.json", "cases/sr-ec/sr-ec.json", "cases/sr-el/sr-el.json", + "cases/dt-tags-oldparser/dt-tags-oldparser.json", + "cases/dt-tags-parsoid/dt-tags-parsoid.json", "cases/no-heading/no-heading.json", "cases/lrm-signature/lrm-signature.json", "cases/fallback-encoding-link/fallback-encoding-link.json", @@ -319,6 +321,10 @@ "cases/it-unsigned-parsoid/it-unsigned-parsoid.html", "cases/sr-ec/sr-ec.html", "cases/sr-el/sr-el.html", + "cases/dt-tags-oldparser/dt-tags-oldparser.html", + "cases/dt-tags-oldparser/dt-tags-oldparser-modified.html", + "cases/dt-tags-parsoid/dt-tags-parsoid.html", + "cases/dt-tags-parsoid/dt-tags-parsoid-modified.html", "cases/no-heading/no-heading.html", "cases/lrm-signature/lrm-signature.html", "cases/fallback-encoding-link/fallback-encoding-link.html", diff --git a/includes/CommentModifier.php b/includes/CommentModifier.php index e41c64283..9be25fd9e 100644 --- a/includes/CommentModifier.php +++ b/includes/CommentModifier.php @@ -126,7 +126,18 @@ class CommentModifier { } // If we can't insert a list directly inside this element, insert after it. - if ( strtolower( $parent->tagName ) === 'p' || strtolower( $parent->tagName ) === 'pre' ) { + // The covered wrapper check above handles most cases, but we still need this sometimes, such as: + // * If the comment starts in the middle of a list, then ends with an unindented p/pre, the + // wrapper check doesn't adjust the parent + // * If the comment consists of multiple list items (starting with a
, so that the comment is + // considered to be unindented, that is level === 1), but not all of them, the wrapper check + // adjusts the parent to be the list, and the rest of the algorithm doesn't handle that well + if ( + strtolower( $parent->tagName ) === 'p' || + strtolower( $parent->tagName ) === 'pre' || + strtolower( $parent->tagName ) === 'ul' || + strtolower( $parent->tagName ) === 'dl' + ) { $parent = $parent->parentNode; $target = $target->parentNode; } diff --git a/modules/modifier.js b/modules/modifier.js index 9780b6a3b..1e76193a3 100644 --- a/modules/modifier.js +++ b/modules/modifier.js @@ -112,7 +112,18 @@ function addListItem( comment ) { } // If we can't insert a list directly inside this element, insert after it. - if ( parent.tagName.toLowerCase() === 'p' || parent.tagName.toLowerCase() === 'pre' ) { + // The covered wrapper check above handles most cases, but we still need this sometimes, such as: + // * If the comment starts in the middle of a list, then ends with an unindented p/pre, the + // wrapper check doesn't adjust the parent + // * If the comment consists of multiple list items (starting with a
, so that the comment is + // considered to be unindented, that is level === 1), but not all of them, the wrapper check + // adjusts the parent to be the list, and the rest of the algorithm doesn't handle that well + if ( + parent.tagName.toLowerCase() === 'p' || + parent.tagName.toLowerCase() === 'pre' || + parent.tagName.toLowerCase() === 'ul' || + parent.tagName.toLowerCase() === 'dl' + ) { parent = parent.parentNode; target = target.parentNode; } diff --git a/tests/cases/comments.json b/tests/cases/comments.json index 50a40750c..dae27375c 100644 --- a/tests/cases/comments.json +++ b/tests/cases/comments.json @@ -111,6 +111,20 @@ "config": "../data/srwiki-config.json", "data": "../data/srwiki-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.json", + "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.json", + "config": "../data/enwiki-config.json", + "data": "../data/enwiki-data.json" + }, { "name": "No heading", "dom": "cases/no-heading/no-heading.html", diff --git a/tests/cases/dt-tags-oldparser/dt-tags-oldparser-modified.html b/tests/cases/dt-tags-oldparser/dt-tags-oldparser-modified.html new file mode 100644 index 000000000..c8be0cfab --- /dev/null +++ b/tests/cases/dt-tags-oldparser/dt-tags-oldparser-modified.html @@ -0,0 +1,39 @@ +

test1

+

a Matma Rex (talk) 10:25, 21 April 2021 (UTC) +

+
b Matma Rex (talk) 10:25, 21 April 2021 (UTC)
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-test1
+
d Matma Rex (talk) 10
+
25, 21 April 2021 (UTC)
+
e Matma Rex (talk) 10:25, 21 April 2021 (UTC)
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-test1-1
+

test2

+

a Matma Rex (talk) 10:25, 21 April 2021 (UTC) +

+
b Matma Rex (talk) 10:25, 21 April 2021 (UTC) +
c Matma Rex (talk) 10:25, 21 April 2021 (UTC)
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z-2
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z-1
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-test2
+
d Matma Rex (talk) 10
+
25, 21 April 2021 (UTC)
+
e Matma Rex (talk) 10:25, 21 April 2021 (UTC)
+ +
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-test2-1
+ + +
\ No newline at end of file diff --git a/tests/cases/dt-tags-oldparser/dt-tags-oldparser.html b/tests/cases/dt-tags-oldparser/dt-tags-oldparser.html new file mode 100644 index 000000000..bab8ce362 --- /dev/null +++ b/tests/cases/dt-tags-oldparser/dt-tags-oldparser.html @@ -0,0 +1,39 @@ +

test1

+

a Matma Rex (talk) 10:25, 21 April 2021 (UTC) +

+
b Matma Rex (talk) 10:25, 21 April 2021 (UTC)
+
d Matma Rex (talk) 10
+
25, 21 April 2021 (UTC)
+
e Matma Rex (talk) 10:25, 21 April 2021 (UTC)
+

test2

+

a Matma Rex (talk) 10:25, 21 April 2021 (UTC) +

+
b Matma Rex (talk) 10:25, 21 April 2021 (UTC) +
c Matma Rex (talk) 10:25, 21 April 2021 (UTC)
+
d Matma Rex (talk) 10
+
25, 21 April 2021 (UTC)
+
e Matma Rex (talk) 10:25, 21 April 2021 (UTC)
+ + + + +
\ No newline at end of file diff --git a/tests/cases/dt-tags-oldparser/dt-tags-oldparser.json b/tests/cases/dt-tags-oldparser/dt-tags-oldparser.json new file mode 100644 index 000000000..d55760548 --- /dev/null +++ b/tests/cases/dt-tags-oldparser/dt-tags-oldparser.json @@ -0,0 +1,185 @@ +[ + { + "placeholderHeading": false, + "type": "heading", + "range": [ + "0/0/0/0", + "0/0/0/1" + ], + "headingLevel": 2, + "level": 0, + "name": "h-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "h-test1-2021-04-21T10:25:00.000Z", + "warnings": [], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/2/0", + "0/2/4/28" + ], + "signatureRanges": [ + [ + "0/2/1", + "0/2/4/28" + ] + ], + "level": 1, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-test1", + "warnings": [], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/4/0/0", + "0/4/0/4/28" + ], + "signatureRanges": [ + [ + "0/4/0/1", + "0/4/0/4/28" + ] + ], + "level": 2, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z", + "warnings": [], + "replies": [] + } + ] + }, + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/4/2/0", + "0/4/6/4/28" + ], + "signatureRanges": [ + [ + "0/4/6/1", + "0/4/6/4/28" + ] + ], + "level": 1, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-test1-1", + "warnings": [ + "Comment starts and ends with different indentation", + "Duplicate comment ID" + ], + "replies": [] + } + ] + }, + { + "placeholderHeading": false, + "type": "heading", + "range": [ + "0/6/0/0", + "0/6/0/1" + ], + "headingLevel": 2, + "level": 0, + "name": "h-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "h-test2-2021-04-21T10:25:00.000Z", + "warnings": [], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/8/0", + "0/8/4/28" + ], + "signatureRanges": [ + [ + "0/8/1", + "0/8/4/28" + ] + ], + "level": 1, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-test2", + "warnings": [], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/10/0/0", + "0/10/0/4/28" + ], + "signatureRanges": [ + [ + "0/10/0/1", + "0/10/0/4/28" + ] + ], + "level": 2, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z-1", + "warnings": [ + "Duplicate comment ID" + ], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/10/0/5/0/0", + "0/10/0/5/0/4/28" + ], + "signatureRanges": [ + [ + "0/10/0/5/0/1", + "0/10/0/5/0/4/28" + ] + ], + "level": 3, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z-2", + "warnings": [ + "Duplicate comment ID" + ], + "replies": [] + } + ] + } + ] + }, + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/12/0/0", + "0/12/4/4/28" + ], + "signatureRanges": [ + [ + "0/12/4/1", + "0/12/4/4/28" + ] + ], + "level": 1, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-test2-1", + "warnings": [ + "Comment starts and ends with different indentation", + "Duplicate comment ID" + ], + "replies": [] + } + ] + } +] diff --git a/tests/cases/dt-tags-oldparser/dt-tags.wikitext b/tests/cases/dt-tags-oldparser/dt-tags.wikitext new file mode 100644 index 000000000..b47b5a85b --- /dev/null +++ b/tests/cases/dt-tags-oldparser/dt-tags.wikitext @@ -0,0 +1,12 @@ +== test1 == +a [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) +:b [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) +;d [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) +:e [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) + +== test2 == +a [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) +:b [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) +::c [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) +;d [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) +:e [[User:Matma Rex|Matma Rex]] ([[User talk:Matma Rex|talk]]) 10:25, 21 April 2021 (UTC) \ No newline at end of file diff --git a/tests/cases/dt-tags-parsoid/dt-tags-parsoid-modified.html b/tests/cases/dt-tags-parsoid/dt-tags-parsoid-modified.html new file mode 100644 index 000000000..6d8c18c17 --- /dev/null +++ b/tests/cases/dt-tags-parsoid/dt-tags-parsoid-modified.html @@ -0,0 +1,13 @@ + +Talk:T279445

test1

+

a Matma Rex (talk) 10:25, 21 April 2021 (UTC)

+
b Matma Rex (talk) 10:25, 21 April 2021 (UTC)
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-test1
+
d Matma Rex (talk) 10
25, 21 April 2021 (UTC)
+
e Matma Rex (talk) 10:25, 21 April 2021 (UTC)
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-test1-1
+ +

test2

+

a Matma Rex (talk) 10:25, 21 April 2021 (UTC)

+
b Matma Rex (talk) 10:25, 21 April 2021 (UTC) +
c Matma Rex (talk) 10:25, 21 April 2021 (UTC)
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z-2
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z-1
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-test2
+
d Matma Rex (talk) 10
25, 21 April 2021 (UTC)
+
e Matma Rex (talk) 10:25, 21 April 2021 (UTC)
Reply to c-Matma_Rex-2021-04-21T10:25:00.000Z-test2-1
\ No newline at end of file diff --git a/tests/cases/dt-tags-parsoid/dt-tags-parsoid.html b/tests/cases/dt-tags-parsoid/dt-tags-parsoid.html new file mode 100644 index 000000000..7314d84bd --- /dev/null +++ b/tests/cases/dt-tags-parsoid/dt-tags-parsoid.html @@ -0,0 +1,13 @@ + +Talk:T279445

test1

+

a Matma Rex (talk) 10:25, 21 April 2021 (UTC)

+
b Matma Rex (talk) 10:25, 21 April 2021 (UTC)
+
d Matma Rex (talk) 10
25, 21 April 2021 (UTC)
+
e Matma Rex (talk) 10:25, 21 April 2021 (UTC)
+ +

test2

+

a Matma Rex (talk) 10:25, 21 April 2021 (UTC)

+
b Matma Rex (talk) 10:25, 21 April 2021 (UTC) +
c Matma Rex (talk) 10:25, 21 April 2021 (UTC)
+
d Matma Rex (talk) 10
25, 21 April 2021 (UTC)
+
e Matma Rex (talk) 10:25, 21 April 2021 (UTC)
\ No newline at end of file diff --git a/tests/cases/dt-tags-parsoid/dt-tags-parsoid.json b/tests/cases/dt-tags-parsoid/dt-tags-parsoid.json new file mode 100644 index 000000000..9d167df6e --- /dev/null +++ b/tests/cases/dt-tags-parsoid/dt-tags-parsoid.json @@ -0,0 +1,185 @@ +[ + { + "placeholderHeading": false, + "type": "heading", + "range": [ + "0/1/0/0", + "0/1/0/1" + ], + "headingLevel": 2, + "level": 0, + "name": "h-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "h-test1-2021-04-21T10:25:00.000Z", + "warnings": [], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/1/2/0", + "0/1/2/4/28" + ], + "signatureRanges": [ + [ + "0/1/2/1", + "0/1/2/4/28" + ] + ], + "level": 1, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-test1", + "warnings": [], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/1/4/0/0", + "0/1/4/0/4/28" + ], + "signatureRanges": [ + [ + "0/1/4/0/1", + "0/1/4/0/4/28" + ] + ], + "level": 2, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z", + "warnings": [], + "replies": [] + } + ] + }, + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/1/4/2/0", + "0/1/4/5/4/28" + ], + "signatureRanges": [ + [ + "0/1/4/5/1", + "0/1/4/5/4/28" + ] + ], + "level": 1, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-test1-1", + "warnings": [ + "Comment starts and ends with different indentation", + "Duplicate comment ID" + ], + "replies": [] + } + ] + }, + { + "placeholderHeading": false, + "type": "heading", + "range": [ + "0/2/0/0", + "0/2/0/1" + ], + "headingLevel": 2, + "level": 0, + "name": "h-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "h-test2-2021-04-21T10:25:00.000Z", + "warnings": [], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/2/2/0", + "0/2/2/4/28" + ], + "signatureRanges": [ + [ + "0/2/2/1", + "0/2/2/4/28" + ] + ], + "level": 1, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-test2", + "warnings": [], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/2/4/0/0", + "0/2/4/0/4/28" + ], + "signatureRanges": [ + [ + "0/2/4/0/1", + "0/2/4/0/4/28" + ] + ], + "level": 2, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z-1", + "warnings": [ + "Duplicate comment ID" + ], + "replies": [ + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/2/4/0/5/0/0", + "0/2/4/0/5/0/4/28" + ], + "signatureRanges": [ + [ + "0/2/4/0/5/0/1", + "0/2/4/0/5/0/4/28" + ] + ], + "level": 3, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-Matma_Rex-2021-04-21T10:25:00.000Z-2", + "warnings": [ + "Duplicate comment ID" + ], + "replies": [] + } + ] + } + ] + }, + { + "type": "comment", + "timestamp": "2021-04-21T10:25:00.000Z", + "author": "Matma Rex", + "range": [ + "0/2/4/2/0", + "0/2/4/5/4/28" + ], + "signatureRanges": [ + [ + "0/2/4/5/1", + "0/2/4/5/4/28" + ] + ], + "level": 1, + "name": "c-Matma_Rex-2021-04-21T10:25:00.000Z", + "id": "c-Matma_Rex-2021-04-21T10:25:00.000Z-test2-1", + "warnings": [ + "Comment starts and ends with different indentation", + "Duplicate comment ID" + ], + "replies": [] + } + ] + } +] diff --git a/tests/cases/modified.json b/tests/cases/modified.json index df8be7d7e..6faa33023 100644 --- a/tests/cases/modified.json +++ b/tests/cases/modified.json @@ -41,6 +41,20 @@ "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",