mediawiki-extensions-Cite/tests/parser/citeParserTests-knownFailures.json
thiemowmde 6a18eac513 Fix regular expressions not being case-insensitive
The "parser marker" placeholders are case-sensitive, e.g. for a tag
that's written like <rEf> the placeholder will also say …-rEf-…. This
was really just a mistake.

The error is as old as this code is. Added in commit 75004e33 in
2009.

Note we shouldn't use /i at the end because the marker itself should
not be case-insensitive. Only the tag name.

Instead of adding more (slow) test cases I update two that are
exactly about this part of Cite (nested tags) anyway.

Bug: T64335
Change-Id: I44c7a42a0da682a1082952fd1af817bf7d45378c
2023-12-11 19:21:12 +01:00

18 lines
6.1 KiB
JSON

{
"Multiple definition (inside {{#tag:references}})": {
"wt2html": "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-a_1-0\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[0,16,16,0]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"a\"}}'><a href=\"./Parser_test#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references mw:Transclusion\" about=\"#mwt5\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,86,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:references\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"\\n&lt;ref name=\\\"a\\\">abc&lt;/ref>\\n&lt;ref name=\\\"a\\\">def&lt;/ref>\\n\"}},\"i\":0}}]}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-a-1\" id=\"cite_note-a-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-a_1-0\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-a-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">abc</span></li></ol></div>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt13\" data-parsoid='{\"dsr\":[87,101,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"></ol></div>"
},
"T242437 - Blank ref name in #tag regression": {
"wt2html": "<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references mw:Transclusion\" about=\"#mwt2\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,44,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:references\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"\\n&lt;ref name=\\\"\\\">foo&lt;/ref>\\n\"}},\"i\":0}}]}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><span rel=\"mw:referencedBy\" data-parsoid=\"{}\"></span> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">foo</span></li></ol></div>"
},
"T242437 - Nested references edge case, outer tag function with LDR": {
"wt2html": "<p data-parsoid='{\"dsr\":[0,18,0,0]}'><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-foo_1-0\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[0,18,18,0]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"foo\"}}'><a href=\"./Parser_test#cite_note-foo-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references mw:Transclusion\" about=\"#mwt5\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[19,86,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:references\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"\\n &lt;ref name=\\\"foo\\\">bar&lt;/ref>\\n\\n &lt;References />\\n\"}},\"i\":0}}]}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-foo-1\" id=\"cite_note-foo-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-foo_1-0\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-foo-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">bar</span></li></ol></div>"
},
"T242437 - Nested references edge case, outer tag function, inner LDR": {
"wt2html": "<p data-parsoid='{\"dsr\":[0,18,0,0]}'><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-foo_1-0\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[0,18,18,0]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"foo\"}}'><a href=\"./Parser_test#cite_note-foo-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references mw:Transclusion\" about=\"#mwt4\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[19,101,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:references\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"\\n &lt;references>\\n &lt;ref name=\\\"foo\\\">bar&lt;/ref>\\n &lt;/references>\\n\"}},\"i\":0}}]}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-foo-1\" id=\"cite_note-foo-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-foo_1-0\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-foo-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">bar</span></li></ol></div>"
},
"Report bad attributes in ref tags": {
"wt2html": "<p data-parsoid='{\"dsr\":[0,65,0,0]}'><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-theName_1-0\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[0,65,51,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"theName\",\"group\":\"theGroup\",\"dummy\":\"dummy\"},\"body\":{\"id\":\"mw-reference-text-cite_note-theName-1\"}}'><a href=\"./Parser_test#cite_note-theName-1\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"theGroup\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[theGroup 1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt4\" data-parsoid='{\"group\":\"theGroup\",\"dsr\":[66,97,31,0]}' data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"theGroup\"}}'><ol class=\"mw-references references\" data-mw-group=\"theGroup\" data-parsoid=\"{}\"><li about=\"#cite_note-theName-1\" id=\"cite_note-theName-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-theName_1-0\" data-mw-group=\"theGroup\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-theName-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">theValue</span></li></ol></div>"
}
}