!! Version 2 !! article Template:1x !! text {{{1}}} !! endarticle # TODO: add a test for T295168 when tackling it !! test Continue to serialize the old annotated 2.3.0 html !! options parsoid=html2wt annotations=1 !! html/parsoid
foo
foo
bar
baz
foo
bar
baz
!! wikitextLet's have some text.
!! end !! test Inline dummyanno tags !! options annotations=1 !! wikitext Some textSome text with some annotated content inline.
!! end !! test Template inside a dummyanno tag should not make a difference on its handling !! options annotations=1 !! wikitextLet's have some text.
!! end !! test Two inline dummyanno tags should have different rangeIds !! options annotations=1 !! wikitext Some inlineSome inline text followed by some more text inline
!! end !! test Two dummyanno tags on new lines should have different rangeIds !! options annotations=1 !! wikitext SomeSome text followed by some more text to dummyanno
!! end !! test Name attribute in ann2 tags should be added to the meta tag !! options annotations=1 !! wikitext Some textSome text with some undummyannod content inline.
!! end !! test Annotation wrapping an entire paragraph should be nested inside the paragraph !! options annotations=1 !! wikitext foofoo
bar
baz
!! end !! test Two paragraphs between dummyanno tags should roundtrip without duplicating the tags (DSRs are adjusted correctly) !! options annotations=1 !! wikitextplop
Let's have some text.
!! end !! test Start dummyanno tag at the beginning of a paragraph and end within should extend to the end of but not the whole paragraph !! options parsoid={ "modes": ["wt2html", "selser","wt2wt"] } annotations=1 !! wikitextThis should fail miserably ... let's fix it
!! end !! test End dummyanno tag at the end of a paragraph and beginning within should extend to the end of but not the whole paragraph !! options parsoid={ "modes": ["wt2html", "selser","wt2wt"] } annotations=1 !! wikitext This should ''failThis should fail miserably ... let's fix it
!! end !! test Meta merging with annotations/template should not happen !! options annotations=1 !! wikitextstuff
!! end !! test Meta merging with template/annotation is fine !! options annotations=1 !! wikitext {{1x|stuff
!! end !! test Attributes without value should be transferred to and back from the meta tag !! options annotations=1 !! wikitextsome stuff
!! end !! test Annotation open tag in fosterable position should expand the range to the entire table !! options parsoid={ "modes": ["wt2html", "selser","wt2wt"] } annotations=1 !! wikitext {| |table |with |-table | with |
some | content |
dummyanno | one line |
foo bar
baz |
table |
stuff |
Some text!
table |
stuff |
area with new lines !! options annotations=1 !! wikitextfoo !! html/parsoidfoo!! end !! test Newlines should be inserted between annotation tags and pre !! options parsoid={ "modes": ["html2wt"] } annotations=1 !! html/parsoid foobarbaz foobarbaz !! wikitext foobar baz foo bar baz !! end !! test dummyanno tags in list items !! options annotations=1 !! wikitext *List item! !! html/parsoid
One paragraph.
And another.
!! end !! test 2/ Extended annotation range !! options parsoid={ "modes": ["wt2html", "selser","wt2wt"] } annotations=1 !! wikitext This is ''anThis is an artificial example of extension.
!! end !! test 3/ Two types of annotation, nested; annotation attributes !! options annotations=1 !! wikitextSome text with a variable in the middle
!! end !! test 4/ Template (fully enclosed) in annotation range !! options annotations=1 !! wikitext aaaa bb some content bb aa
!! end !! test 5/ annotation (fully enclosed) in template !! options annotations=1 !! wikitext {{1x|bbbb some content bb aa
!! end !! test 7/ attributes in annotations !! options annotations=1 !! wikitext {| |- | style="background:abc | jkl |
table | with |
some | content |
dummyanno | one line |
plop
"] ] } annotations=1 !! wikitextSome stuff and also some more stuff than that.
!! end !! test Selser: add content in a cell of a table where dummyanno gets fostered out should keep the annotation around the table !! options parsoid={ "modes": ["selser"], "changes": [ ["tr > td:first-child", "text", "plop"] ] } annotations=1 !! wikitext {| |- |a |b |-plop
"], ["meta", "after", "plop2
"] ] } annotations=1 !! wikitextplop
"] ] } annotations=1 !! wikitextplop2
"] ] } annotations=1 !! wikitextThe quick brown fox jumps over the lazy dog.
!! end ## FIXME: This is currently awkward where only the start of the dummyanno is pulled into the template range. ## This doesn't affect correctness because the ranges are all marked extended (because of bad nesting). ## But, the bad nesting is an artefact of how the paragraph wrapper leaves the opening and closing meta ## tags of the annotation range in different paragraphs, and one of those paragraphs happen to be from ## a template. If the p-wrapper can be tweaked to be smarter about this, this will get cleaned up better. ## But, for now, the focus is on not breaking selser. !! test Top-level metas should not be migrated into paragraphs, nor pulled in the template !! options parsoid=wt2html,selser,wt2wt annotations=1 !! wikitext {{1x|b
c
!! end !! test Annotations should not be hoisted out of headers !! wikitext ==t1 t2 t3
!! end # T296169 !! test T296169: Extended annotations that yield a nested annotation should not nest said annotation !! options parsoid={ "modes": ["wt2html", "selser", "wt2wt"] } annotations=1 !! wikitext a ''a b c d e f g
!! end !! test # This is not correct yet because the template is not expanded in the HTML - the template is considered as a raw string # instead. Follow-up as T299523. Annotations with templated annotation attribute shouldn't emit a warning and should round-trip !! options annotations=1 !! wikitexttest
!! end !! test Annotations with templated annotation attribute name shouldn't emit a warning and should round-trip !! options annotations=1 !! wikitexttest
!! end !! test Annotations with templated annotation attribute value shouldn't emit a warning and should round-trip !! options annotations=1 !! wikitexttest
!! end !! test Annotation around a heading should not break the heading !! options annotations=1 !! wikitexttxt1
txt2
text3 |
txt4
!! end !! test Extended ranges should not result in bad nesting (T306186) !! options annotations=1 parsoid=wt2html,selser !! wikitexttext by someone
Highway of Montenegro. by Albin Olsson, CC BY-SA 4.0.
Greta Salóme, singing for Iceland. by Albin Olsson, CC BY-SA 4.0.
Nina Kraljić, representing Croatia.
Purge!! end