Add 'reference-text' class to Parsoid's HTML

This adds the 'reference-text' class where Parsoid added
'mw-reference-text'.

If we don't care about the "mw-" prefix, since there are very
few wiki and code references to 'mw-reference-text', it might
seem like we could update all those references and rip out
'mw-reference-text' from Parsoid output.

But, Parsoid HTML is also exposed via the REST API which means
there are likely many users out there analyzing Parsoid HTML.
https://github.com/search?q=%22mw-reference-text%22+NOT+language%3AHTML&type=code
says there are 512 references to this string - so looks like
we are probably going to rely on a major HTML version bump in
Parsoid in the future and then rip out all the duplicate
classes (mw-ref, mw-references, mw-reference-text OR
reference, references, reference-text).

Bug: T328695
Change-Id: I04b18ac75863a0e3e61bdd47b34508e5547dc872
This commit is contained in:
Subramanya Sastry 2024-05-28 10:49:58 -05:00
parent db6d5c2054
commit 50f01c4f28
3 changed files with 184 additions and 182 deletions

View file

@ -67,7 +67,9 @@ class RefGroup {
$reftextSpan,
[
'id' => 'mw-reference-text-' . $refTarget,
'class' => 'mw-reference-text',
// Add both mw-reference-text & reference-text for b/c.
// We will remove duplicate classes in the future.
'class' => 'mw-reference-text reference-text',
]
);
if ( $refContentId ) {

View file

@ -116,13 +116,13 @@
"selser [2,4,0]": "kpn8qp\n\n[[Foo|hello <ref>note 1</ref><ref>note 2</ref>]]<ref>note 3</ref>\n\n1wtlfei<references />"
},
"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='{\"name\":\"references\",\"attrs\":{},\"body\":{\"extsrc\":\"\\n&lt;ref name=\\\"a\\\">abc&lt;/ref>\\n&lt;ref name=\\\"a\\\">def&lt;/ref>\\n\"},\"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>",
"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='{\"name\":\"references\",\"attrs\":{},\"body\":{\"extsrc\":\"\\n&lt;ref name=\\\"a\\\">abc&lt;/ref>\\n&lt;ref name=\\\"a\\\">def&lt;/ref>\\n\"},\"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 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>",
"html2html": "<p data-parsoid='{\"dsr\":[0,28,0,0]}'>Parsoid fails this right now</p>",
"html2wt": "Parsoid fails this right now"
},
"Numbers in the default group need to start with 1, independent from other groups": {
"wt2wt": "<ref name=\"a\" group=\"g\" />\n{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}\n<ref name=\"c\">c</ref>\n<references />",
"html2html": "<p data-parsoid='{\"dsr\":[0,26,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,26,26,0]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"a\",\"group\":\"g\"}}'><a href=\"./Parser_test#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"g\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[g 1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references mw:Transclusion\" about=\"#mwt4\" data-parsoid='{\"group\":\"g\",\"pi\":[[{\"k\":\"1\"},{\"k\":\"group\",\"named\":true}]],\"dsr\":[27,76,null,null]}' data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"g\"},\"body\":{\"extsrc\":\"&lt;ref name=\\\"a\\\">a&lt;/ref>\"},\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:references\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"&lt;ref name=\\\"a\\\">a&lt;/ref>\"},\"group\":{\"wt\":\"g\"}},\"i\":0}}]}'><ol class=\"mw-references references\" data-mw-group=\"g\" data-parsoid=\"{}\"><li about=\"#cite_note-a-1\" id=\"cite_note-a-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-a_1-0\" data-mw-group=\"g\" 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=\"{}\">a</span></li></ol></div>\n<p data-parsoid='{\"dsr\":[77,98,0,0]}'><sup about=\"#mwt10\" class=\"mw-ref reference\" id=\"cite_ref-c_2-0\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[77,98,14,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"c\"},\"body\":{\"id\":\"mw-reference-text-cite_note-c-2\"}}'><a href=\"./Parser_test#cite_note-c-2\" 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\" about=\"#mwt12\" data-parsoid='{\"dsr\":[99,113,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-c-2\" id=\"cite_note-c-2\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-c_2-0\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-c-2\" class=\"mw-reference-text\" data-parsoid=\"{}\">c</span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,26,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,26,26,0]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"a\",\"group\":\"g\"}}'><a href=\"./Parser_test#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"g\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[g 1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references mw:Transclusion\" about=\"#mwt4\" data-parsoid='{\"group\":\"g\",\"pi\":[[{\"k\":\"1\"},{\"k\":\"group\",\"named\":true}]],\"dsr\":[27,76,null,null]}' data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"g\"},\"body\":{\"extsrc\":\"&lt;ref name=\\\"a\\\">a&lt;/ref>\"},\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:references\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"&lt;ref name=\\\"a\\\">a&lt;/ref>\"},\"group\":{\"wt\":\"g\"}},\"i\":0}}]}'><ol class=\"mw-references references\" data-mw-group=\"g\" data-parsoid=\"{}\"><li about=\"#cite_note-a-1\" id=\"cite_note-a-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-a_1-0\" data-mw-group=\"g\" 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 reference-text\" data-parsoid=\"{}\">a</span></li></ol></div>\n<p data-parsoid='{\"dsr\":[77,98,0,0]}'><sup about=\"#mwt10\" class=\"mw-ref reference\" id=\"cite_ref-c_2-0\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[77,98,14,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"c\"},\"body\":{\"id\":\"mw-reference-text-cite_note-c-2\"}}'><a href=\"./Parser_test#cite_note-c-2\" 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\" about=\"#mwt12\" data-parsoid='{\"dsr\":[99,113,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-c-2\" id=\"cite_note-c-2\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-c_2-0\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-c-2\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">c</span></li></ol></div>",
"html2wt": "<ref name=\"a\" group=\"g\" />\n{{#tag:references|<ref name=\"a\">a</ref>|group=g}}\n<ref name=\"c\">c</ref>\n<references />",
"selser [3,0,0,3,1,2,0]": "\n{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}<ref name=\"c\">c</ref>\n\n1xkz57y\n",
"selser [3,0,0,2,3,0,0]": "\n{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}1x4tyf2\n\n",
@ -147,7 +147,7 @@
},
"Ref in ref: Multiple levels of nesting in parser function": {
"wt2wt": "one{{#tag:ref|two{{#tag:ref|three<ref>four</ref>}}}}\n<references />",
"html2html": "<p data-parsoid='{\"dsr\":[0,52,0,0]}'>one<sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-3\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[3,52,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"extsrc\":\"two&lt;ref>three&lt;ref>four&lt;/ref>&lt;/ref>\"},\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:ref\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"two{{#tag:ref|three&lt;ref>four&lt;/ref>}}\"}},\"i\":0}}]}'><a href=\"./Parser_test#cite_note-3\" style=\"counter-reset: mw-Ref 3;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[3]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt10\" data-parsoid='{\"dsr\":[53,67,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">four</span></li><li about=\"#cite_note-2\" id=\"cite_note-2\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-2\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text\" data-parsoid=\"{}\">three<sup about=\"#mwt6\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>four&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup></span></li><li about=\"#cite_note-3\" id=\"cite_note-3\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-3\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-3\" class=\"mw-reference-text\" data-parsoid=\"{}\">two<sup about=\"#mwt7\" class=\"mw-ref reference\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>three&lt;ref>four&lt;/ref>&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-2\"}}'><a href=\"./Parser_test#cite_note-2\" style=\"counter-reset: mw-Ref 2;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[2]</span></a></sup></span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,52,0,0]}'>one<sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-3\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[3,52,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"extsrc\":\"two&lt;ref>three&lt;ref>four&lt;/ref>&lt;/ref>\"},\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:ref\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"two{{#tag:ref|three&lt;ref>four&lt;/ref>}}\"}},\"i\":0}}]}'><a href=\"./Parser_test#cite_note-3\" style=\"counter-reset: mw-Ref 3;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[3]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt10\" data-parsoid='{\"dsr\":[53,67,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">four</span></li><li about=\"#cite_note-2\" id=\"cite_note-2\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-2\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">three<sup about=\"#mwt6\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>four&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup></span></li><li about=\"#cite_note-3\" id=\"cite_note-3\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-3\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-3\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">two<sup about=\"#mwt7\" class=\"mw-ref reference\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>three&lt;ref>four&lt;/ref>&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-2\"}}'><a href=\"./Parser_test#cite_note-2\" style=\"counter-reset: mw-Ref 2;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[2]</span></a></sup></span></li></ol></div>",
"html2wt": "one{{#tag:ref|two{{#tag:ref|three<ref>four</ref>}}}}\n<references />",
"selser [1,3,0]": "one{{#tag:ref|two{{#tag:ref|three<ref>four</ref>}}}}",
"selser [[2,0],0,0]": "1wgx3mrone{{#tag:ref|two{{#tag:ref|three<ref>four</ref>}}}}\n",
@ -196,7 +196,7 @@
},
"Ref: 8. transclusion wikitext has lower precedence": {
"wt2wt": "A <ref><nowiki> foo {{1x|</nowiki></ref><nowiki> B C}}</nowiki>\n\n<references />",
"html2html": "<p data-parsoid='{\"dsr\":[0,63,0,0]}'>A <sup about=\"#mwt4\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[2,40,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[40,63,8,9]}'> B C}}</span></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt6\" data-parsoid='{\"dsr\":[64,78,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\"> foo {{1x|</span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,63,0,0]}'>A <sup about=\"#mwt4\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[2,40,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[40,63,8,9]}'> B C}}</span></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt6\" data-parsoid='{\"dsr\":[64,78,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\"> foo {{1x|</span></li></ol></div>",
"html2wt": "A <ref><nowiki> foo {{1x|</nowiki></ref><nowiki> B C}}</nowiki>\n<references />",
"selser [[3,0,0],0,0]": "<ref> foo {{1x|</ref> B C}}\n\n<references />",
"selser [[3,0,0],3,0]": "<ref> foo {{1x|</ref> B C}}<references />",
@ -244,7 +244,7 @@
},
"References: 9. Generate missing references list at the end": {
"wt2wt": "A <ref>foo</ref>\nB <ref group=\"inexistent\">bar</ref>\n<references />\n",
"html2html": "<p data-parsoid='{\"dsr\":[0,52,0,0]}'>A <sup about=\"#mwt3\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[2,16,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup> B <sup about=\"#mwt4\" class=\"mw-ref reference\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref mw:Error\" data-parsoid='{\"dsr\":[19,52,24,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"group\":\"inexistent\"},\"body\":{\"id\":\"mw-reference-text-cite_note-2\"},\"errors\":[{\"key\":\"cite_error_group_refs_without_references\",\"params\":[\"inexistent\"]}]}'><a href=\"./Parser_test#cite_note-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"inexistent\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[inexistent 1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt6\" data-parsoid='{\"dsr\":[53,67,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">foo</span></li></ol></div>\n\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt7\" data-parsoid='{\"group\":\"inexistent\",\"dsr\":[68,68,0,0]}' data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"inexistent\"},\"autoGenerated\":true}'><ol class=\"mw-references references\" data-mw-group=\"inexistent\" data-parsoid=\"{}\"><li about=\"#cite_note-2\" id=\"cite_note-2\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-2\" data-mw-group=\"inexistent\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text\" data-parsoid=\"{}\">bar</span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,52,0,0]}'>A <sup about=\"#mwt3\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[2,16,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup> B <sup about=\"#mwt4\" class=\"mw-ref reference\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref mw:Error\" data-parsoid='{\"dsr\":[19,52,24,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"group\":\"inexistent\"},\"body\":{\"id\":\"mw-reference-text-cite_note-2\"},\"errors\":[{\"key\":\"cite_error_group_refs_without_references\",\"params\":[\"inexistent\"]}]}'><a href=\"./Parser_test#cite_note-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"inexistent\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[inexistent 1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt6\" data-parsoid='{\"dsr\":[53,67,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">foo</span></li></ol></div>\n\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt7\" data-parsoid='{\"group\":\"inexistent\",\"dsr\":[68,68,0,0]}' data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"inexistent\"},\"autoGenerated\":true}'><ol class=\"mw-references references\" data-mw-group=\"inexistent\" data-parsoid=\"{}\"><li about=\"#cite_note-2\" id=\"cite_note-2\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-2\" data-mw-group=\"inexistent\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">bar</span></li></ol></div>",
"html2wt": "A <ref>foo</ref> B <ref group=\"inexistent\">bar</ref>\n<references />\n",
"selser [0,4,0,3,0]": "A <ref>foo</ref>\nB <ref group=\"inexistent\">bar</ref>\n\ng0czw3",
"selser [4,4,0,4,0]": "whc1pl\n\n1mmf2281nhjc7y",
@ -268,14 +268,14 @@
"selser [3,0,0,0,0]": "\n"
},
"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>",
"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 reference-text\" data-parsoid=\"{}\">theValue</span></li></ol></div>",
"html2wt": "<span class=\"error mw-ext-cite-error\" lang=\"en\" dir=\"ltr\">Cite error: Invalid parameter in <code><nowiki><ref></nowiki></code> tag</span>\n"
},
"Simple <ref>, with <references/> in group, with groupname in Chinese": {
"html2wt": "AAA<ref group=\"参\">ref a</ref>BBB<ref group=\"注\">note b</ref>CCC<ref group=\"参\">ref c</ref>\n\n; refs\n<references group=\"参\" />\n\n; notes\n<references group=\"注\" />"
},
"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='{\"name\":\"references\",\"attrs\":{},\"body\":{\"extsrc\":\"\\n&lt;ref name=\\\"\\\">foo&lt;/ref>\\n\"},\"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>",
"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='{\"name\":\"references\",\"attrs\":{},\"body\":{\"extsrc\":\"\\n&lt;ref name=\\\"\\\">foo&lt;/ref>\\n\"},\"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 reference-text\" data-parsoid=\"{}\">foo</span></li></ol></div>",
"html2wt": "<span class=\"error mw-ext-cite-error\" lang=\"en\" dir=\"ltr\">Cite error: <code><nowiki><ref></nowiki></code> tag defined in <code><nowiki><references></nowiki></code> has no name attribute.</span>\n"
},
"T242437 - Nested references edge case, inner tag function with LDR": {
@ -302,18 +302,18 @@
"selser [4,4,0]": "1w3p74w\n\n164bamw<references>\n {{#tag:references|\n <ref name=\"foo\">bar</ref>\n }}\n</references>"
},
"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='{\"name\":\"references\",\"attrs\":{},\"body\":{\"extsrc\":\"\\n &lt;ref name=\\\"foo\\\">bar&lt;/ref>\\n\\n &lt;References />\\n\"},\"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>",
"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='{\"name\":\"references\",\"attrs\":{},\"body\":{\"extsrc\":\"\\n &lt;ref name=\\\"foo\\\">bar&lt;/ref>\\n\\n &lt;References />\\n\"},\"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 reference-text\" data-parsoid=\"{}\">bar</span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,28,0,0]}'>Parsoid fails this right now</p>",
"html2wt": "Parsoid fails this right now"
},
"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='{\"name\":\"references\",\"attrs\":{},\"body\":{\"extsrc\":\"\\n &lt;references>\\n &lt;ref name=\\\"foo\\\">bar&lt;/ref>\\n &lt;/references>\\n\"},\"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>",
"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='{\"name\":\"references\",\"attrs\":{},\"body\":{\"extsrc\":\"\\n &lt;references>\\n &lt;ref name=\\\"foo\\\">bar&lt;/ref>\\n &lt;/references>\\n\"},\"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 reference-text\" data-parsoid=\"{}\">bar</span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,28,0,0]}'>Parsoid fails this right now</p>",
"html2wt": "Parsoid fails this right now"
},
"T48140 - Make sure rollback/redo does not consume numbers": {
"wt2wt": "<ref>should be [1]</ref>\n<ref name=\"a\" group=\"g\" />\n{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}\n<ref>should be [2]</ref>\n<references />",
"html2html": "<p data-parsoid='{\"dsr\":[0,51,0,0]}'><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[0,24,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>\n<sup about=\"#mwt4\" class=\"mw-ref reference\" id=\"cite_ref-a_2-0\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[25,51,26,0]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"a\",\"group\":\"g\"}}'><a href=\"./Parser_test#cite_note-a-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"g\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[g 1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references mw:Transclusion\" about=\"#mwt6\" data-parsoid='{\"group\":\"g\",\"pi\":[[{\"k\":\"1\"},{\"k\":\"group\",\"named\":true}]],\"dsr\":[52,103,null,null]}' data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"g\"},\"body\":{\"extsrc\":\"\\n&lt;ref name=\\\"a\\\">a&lt;/ref>\\n\"},\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:references\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"\\n&lt;ref name=\\\"a\\\">a&lt;/ref>\\n\"},\"group\":{\"wt\":\"g\"}},\"i\":0}}]}'><ol class=\"mw-references references\" data-mw-group=\"g\" data-parsoid=\"{}\"><li about=\"#cite_note-a-2\" id=\"cite_note-a-2\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-a_2-0\" data-mw-group=\"g\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-a-2\" class=\"mw-reference-text\" data-parsoid=\"{}\">a</span></li></ol></div>\n<p data-parsoid='{\"dsr\":[104,128,0,0]}'><sup about=\"#mwt12\" class=\"mw-ref reference\" id=\"cite_ref-3\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[104,128,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-3\"}}'><a href=\"./Parser_test#cite_note-3\" style=\"counter-reset: mw-Ref 2;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[2]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt14\" data-parsoid='{\"dsr\":[129,143,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">should be [1]</span></li><li about=\"#cite_note-3\" id=\"cite_note-3\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-3\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-3\" class=\"mw-reference-text\" data-parsoid=\"{}\">should be [2]</span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,51,0,0]}'><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[0,24,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>\n<sup about=\"#mwt4\" class=\"mw-ref reference\" id=\"cite_ref-a_2-0\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[25,51,26,0]}' data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"a\",\"group\":\"g\"}}'><a href=\"./Parser_test#cite_note-a-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"g\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[g 1]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references mw:Transclusion\" about=\"#mwt6\" data-parsoid='{\"group\":\"g\",\"pi\":[[{\"k\":\"1\"},{\"k\":\"group\",\"named\":true}]],\"dsr\":[52,103,null,null]}' data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"g\"},\"body\":{\"extsrc\":\"\\n&lt;ref name=\\\"a\\\">a&lt;/ref>\\n\"},\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:references\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"\\n&lt;ref name=\\\"a\\\">a&lt;/ref>\\n\"},\"group\":{\"wt\":\"g\"}},\"i\":0}}]}'><ol class=\"mw-references references\" data-mw-group=\"g\" data-parsoid=\"{}\"><li about=\"#cite_note-a-2\" id=\"cite_note-a-2\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-a_2-0\" data-mw-group=\"g\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-a-2\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">a</span></li></ol></div>\n<p data-parsoid='{\"dsr\":[104,128,0,0]}'><sup about=\"#mwt12\" class=\"mw-ref reference\" id=\"cite_ref-3\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[104,128,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-3\"}}'><a href=\"./Parser_test#cite_note-3\" style=\"counter-reset: mw-Ref 2;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[2]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt14\" data-parsoid='{\"dsr\":[129,143,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">should be [1]</span></li><li about=\"#cite_note-3\" id=\"cite_note-3\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-3\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-3\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">should be [2]</span></li></ol></div>",
"html2wt": "<ref>should be [1]</ref>\n<ref name=\"a\" group=\"g\" />\n{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}\n<ref>should be [2]</ref>\n<references />",
"selser [0,4,0,0,2,0,0]": "<ref>should be [1]</ref>\n<ref name=\"a\" group=\"g\" />\n\nxxyaqo{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}\nfpd64i\n\n<ref>should be [2]</ref>",
"selser [0,3,0,0,0,0,0]": "<ref>should be [1]</ref>\n<ref name=\"a\" group=\"g\" />{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}\n<ref>should be [2]</ref>",
@ -337,12 +337,12 @@
"selser [2,2,0,4,1,4,0]": "1hsihii\n\n<ref>should be [1]</ref>\n<ref name=\"a\" group=\"g\" />\n\n1g6dh4b\n{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}tw7h2w\n\n<ref>should be [2]</ref>\n\n4jzjr9"
},
"Template nested in extension tag in template": {
"wt2html": "<p data-parsoid='{\"dsr\":[0,123,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,36,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>[[ho|{{1x|hi}}]]&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>[[ho|{{1x|hi}}]]&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>\n<span about=\"#mwt7\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[37,86,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>[http://test.com?q={{1x|ho}}]&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt7\" class=\"mw-ref reference\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>[http://test.com?q={{1x|ho}}]&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-2\"}}'><a href=\"./Main_Page#cite_note-2\" style=\"counter-reset: mw-Ref 2;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[2]</span></a></sup>\n<span about=\"#mwt12\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[87,123,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>-{ho|{{1x|hi}}}-&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt12\" class=\"mw-ref reference\" id=\"cite_ref-3\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>-{ho|{{1x|hi}}}-&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-3\"}}'><a href=\"./Main_Page#cite_note-3\" style=\"counter-reset: mw-Ref 3;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[3]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt17\" data-parsoid='{\"dsr\":[124,138,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\"><a rel=\"mw:WikiLink\" href=\"./Ho?action=edit&amp;redlink=1\" title=\"Ho\" class=\"new\" typeof=\"mw:LocalizedAttrs\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Ho\"},\"sa\":{\"href\":\"ho\"}}' data-mw-i18n='{\"title\":{\"lang\":\"x-page\",\"key\":\"red-link-title\",\"params\":[\"Ho\"]}}'>hi</a></span></li><li about=\"#cite_note-2\" id=\"cite_note-2\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-2\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text\" data-parsoid=\"{}\"><a rel=\"mw:ExtLink nofollow\" href=\"http://test.com?q=ho\" class=\"external autonumber\" data-parsoid=\"{}\"></a></span></li><li about=\"#cite_note-3\" id=\"cite_note-3\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-3\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-3\" class=\"mw-reference-text\" data-parsoid=\"{}\"><span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"ho\"],\"t\":\"hi\"}}' data-parsoid='{\"fl\":[\"ho\"],\"src\":\"-{ho|{{1x|hi}}}-\"}'></span></span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,123,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,36,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>[[ho|{{1x|hi}}]]&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>[[ho|{{1x|hi}}]]&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>\n<span about=\"#mwt7\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[37,86,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>[http://test.com?q={{1x|ho}}]&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt7\" class=\"mw-ref reference\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>[http://test.com?q={{1x|ho}}]&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-2\"}}'><a href=\"./Main_Page#cite_note-2\" style=\"counter-reset: mw-Ref 2;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[2]</span></a></sup>\n<span about=\"#mwt12\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[87,123,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>-{ho|{{1x|hi}}}-&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt12\" class=\"mw-ref reference\" id=\"cite_ref-3\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>-{ho|{{1x|hi}}}-&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-3\"}}'><a href=\"./Main_Page#cite_note-3\" style=\"counter-reset: mw-Ref 3;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[3]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt17\" data-parsoid='{\"dsr\":[124,138,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\"><a rel=\"mw:WikiLink\" href=\"./Ho?action=edit&amp;redlink=1\" title=\"Ho\" class=\"new\" typeof=\"mw:LocalizedAttrs\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Ho\"},\"sa\":{\"href\":\"ho\"}}' data-mw-i18n='{\"title\":{\"lang\":\"x-page\",\"key\":\"red-link-title\",\"params\":[\"Ho\"]}}'>hi</a></span></li><li about=\"#cite_note-2\" id=\"cite_note-2\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-2\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text\" data-parsoid=\"{}\"><a rel=\"mw:ExtLink nofollow\" href=\"http://test.com?q=ho\" class=\"external autonumber\" data-parsoid=\"{}\"></a></span></li><li about=\"#cite_note-3\" id=\"cite_note-3\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-3\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-3\" class=\"mw-reference-text\" data-parsoid=\"{}\"><span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"ho\"],\"t\":\"hi\"}}' data-parsoid='{\"fl\":[\"ho\"],\"src\":\"-{ho|{{1x|hi}}}-\"}'></span></span></li></ol></div>"
"wt2html": "<p data-parsoid='{\"dsr\":[0,123,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,36,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>[[ho|{{1x|hi}}]]&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>[[ho|{{1x|hi}}]]&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>\n<span about=\"#mwt7\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[37,86,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>[http://test.com?q={{1x|ho}}]&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt7\" class=\"mw-ref reference\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>[http://test.com?q={{1x|ho}}]&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-2\"}}'><a href=\"./Main_Page#cite_note-2\" style=\"counter-reset: mw-Ref 2;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[2]</span></a></sup>\n<span about=\"#mwt12\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[87,123,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>-{ho|{{1x|hi}}}-&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt12\" class=\"mw-ref reference\" id=\"cite_ref-3\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>-{ho|{{1x|hi}}}-&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-3\"}}'><a href=\"./Main_Page#cite_note-3\" style=\"counter-reset: mw-Ref 3;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[3]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt17\" data-parsoid='{\"dsr\":[124,138,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\"><a rel=\"mw:WikiLink\" href=\"./Ho?action=edit&amp;redlink=1\" title=\"Ho\" class=\"new\" typeof=\"mw:LocalizedAttrs\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Ho\"},\"sa\":{\"href\":\"ho\"}}' data-mw-i18n='{\"title\":{\"lang\":\"x-page\",\"key\":\"red-link-title\",\"params\":[\"Ho\"]}}'>hi</a></span></li><li about=\"#cite_note-2\" id=\"cite_note-2\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-2\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\"><a rel=\"mw:ExtLink nofollow\" href=\"http://test.com?q=ho\" class=\"external autonumber\" data-parsoid=\"{}\"></a></span></li><li about=\"#cite_note-3\" id=\"cite_note-3\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-3\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-3\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\"><span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"ho\"],\"t\":\"hi\"}}' data-parsoid='{\"fl\":[\"ho\"],\"src\":\"-{ho|{{1x|hi}}}-\"}'></span></span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,123,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,36,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>[[ho|{{1x|hi}}]]&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt2\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>[[ho|{{1x|hi}}]]&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>\n<span about=\"#mwt7\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[37,86,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>[http://test.com?q={{1x|ho}}]&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt7\" class=\"mw-ref reference\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>[http://test.com?q={{1x|ho}}]&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-2\"}}'><a href=\"./Main_Page#cite_note-2\" style=\"counter-reset: mw-Ref 2;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[2]</span></a></sup>\n<span about=\"#mwt12\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[87,123,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"hi&lt;ref>-{ho|{{1x|hi}}}-&lt;/ref>\"}},\"i\":0}}]}'>hi</span><sup about=\"#mwt12\" class=\"mw-ref reference\" id=\"cite_ref-3\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref>-{ho|{{1x|hi}}}-&lt;/ref>\"}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-3\"}}'><a href=\"./Main_Page#cite_note-3\" style=\"counter-reset: mw-Ref 3;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[3]</span></a></sup></p>\n<div class=\"mw-references-wrap\" typeof=\"mw:Extension/references\" about=\"#mwt17\" data-parsoid='{\"dsr\":[124,138,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\"><a rel=\"mw:WikiLink\" href=\"./Ho?action=edit&amp;redlink=1\" title=\"Ho\" class=\"new\" typeof=\"mw:LocalizedAttrs\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Ho\"},\"sa\":{\"href\":\"ho\"}}' data-mw-i18n='{\"title\":{\"lang\":\"x-page\",\"key\":\"red-link-title\",\"params\":[\"Ho\"]}}'>hi</a></span></li><li about=\"#cite_note-2\" id=\"cite_note-2\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-2\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\"><a rel=\"mw:ExtLink nofollow\" href=\"http://test.com?q=ho\" class=\"external autonumber\" data-parsoid=\"{}\"></a></span></li><li about=\"#cite_note-3\" id=\"cite_note-3\" data-parsoid=\"{}\"><a href=\"./Main_Page#cite_ref-3\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-3\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\"><span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"ho\"],\"t\":\"hi\"}}' data-parsoid='{\"fl\":[\"ho\"],\"src\":\"-{ho|{{1x|hi}}}-\"}'></span></span></li></ol></div>"
},
"{{REVISIONID}} on page with <ref> (bug 6299)": {
"wt2wt": "{{REVISIONID}}<ref>elite</ref>\n<references />",
"html2html": "<p data-parsoid='{\"dsr\":[0,30,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"REVISIONID\",\"function\":\"revisionid\"},\"params\":{},\"i\":0}}]}'>1337</span><sup about=\"#mwt3\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[14,30,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-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\" about=\"#mwt5\" data-parsoid='{\"dsr\":[31,45,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">elite</span></li></ol></div>",
"html2html": "<p data-parsoid='{\"dsr\":[0,30,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"REVISIONID\",\"function\":\"revisionid\"},\"params\":{},\"i\":0}}]}'>1337</span><sup about=\"#mwt3\" class=\"mw-ref reference\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[14,30,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-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\" about=\"#mwt5\" data-parsoid='{\"dsr\":[31,45,14,0]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><ol class=\"mw-references references\" data-parsoid=\"{}\"><li about=\"#cite_note-1\" id=\"cite_note-1\" data-parsoid=\"{}\"><a href=\"./Parser_test#cite_ref-1\" rel=\"mw:referencedBy\" data-parsoid=\"{}\"><span class=\"mw-linkback-text\" data-parsoid=\"{}\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text reference-text\" data-parsoid=\"{}\">elite</span></li></ol></div>",
"html2wt": "{{REVISIONID}}<ref>elite</ref>\n<references />",
"selser [0,3,0]": "{{REVISIONID}}<ref>elite</ref>",
"selser [4,0,0]": "gqyiqf\n",

File diff suppressed because it is too large Load diff