!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
!! html/php
[1]
- ↑ Book Cite error:
<ref> tag with name "a" cannot use details when inside <references>.
!! html/parsoid
[1]
!! end
!! test
Unused list-defined sub-ref with no name
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
!! html/php
Cite error: <ref> tag with name "" cannot use details when inside <references>.
!! html/parsoid
!! end
# T390974: Bad refs don't round-trip
!! test
Unused list-defined sub-ref with linked existing main ref
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
!! html/php
[1]
Cite error: <ref> tag with name "book" cannot use details when inside <references>.
!! html/parsoid
[1]
!! end
!! test
There is no such thing as a list-defined sub-ref (completely unused)
!! config
wgCiteSubReferencing=true
!! wikitext
[The book]
!! html/php
Cite error: <ref> tag with name "book" cannot use details when inside <references>.
!! html/parsoid
!! end
# T390961: fails to round-trip main+details after main
!! test
Unused list defined sub-ref with used main content
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
[Book]
!! html/php
[1]
- ↑ Book Cite error:
<ref> tag with name "book" cannot use details when inside <references>.
!! html/parsoid
[1]
!! end
!! test
Unused list defined sub-ref with used main content (same as above but with #tag)
!! config
wgCiteSubReferencing=true
!! wikitext
{{#tag:references|[Book]
[Book]}}
!! html/php
[1]
- ↑ Book Cite error:
<ref> tag with name "book" cannot use details when inside <references>.
!! html/parsoid
[1]
!! end
!! test
There is no such thing as a list-defined sub-ref (duplicate main content)
!! config
wgCiteSubReferencing=true
!! wikitext
[The book]
[The book]
!! html/php
[1]
- ↑ The book Cite error:
<ref> tag with name "book" cannot use details when inside <references>.
!! html/parsoid
[1]
!! end
!! test
Unused list defined sub-ref due to duplicate details content
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
!! html/php
[1.1]
- ↑ Book Cite error:
<ref> tag with name "book" cannot use details when inside <references>.
- ↑ page 1
!! html/parsoid
[1.1]
!! end
# T390992: detect conflicting main ref content in main+details
!! test
Conflicting main content
!! config
wgCiteSubReferencing=true
!! options
parsoid=wt2html
!! wikitext
[Book] [Book, but different]
!! html/php
[1.1] [1.2]
- ↑ Book Cite error: Invalid
<ref> tag; name "book" defined multiple times with different content
- ↑ page 1
- ↑ page 2
!! html/parsoid
[1.1] [1.2]
!! end
# T390961: fails to round-trip main+details after main
!! test
Repeating the main content when using details
!! config
wgCiteSubReferencing=true
!! options
parsoid=wt2html
!! wikitext
[Book] [Book] [Book]
!! html/php
[1] [1.1] [1.1]
!! html/parsoid
[1] [1.1] [1.2]
!! end
# T406467: Parsoid doesn't do any merging yet
!! test
Merging sub-refs with inline main that do not repeat the main content
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
!! html/php
[1.1][1.1]
!! html/parsoid
[1.1][1.2]
!! end
# T406467: Parsoid doesn't do any merging yet
!! test
Merging sub-refs with inline main that do repeat the main content
!! config
wgCiteSubReferencing=true
!! wikitext
[Book][Book]
!! html/php
[1.1][1.1]
!! html/parsoid
[1.1][1.2]
!! end
# T406467: Parsoid doesn't do any merging yet
!! test
Merging sub-refs with standalone main
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
!! html/php
[1][1.1][1.1]
!! html/parsoid
[1][1.1][1.2]
!! end
# T406467: Parsoid doesn't do any merging yet
!! test
Merging sub-refs with multiple list-defined main refs
!! config
wgCiteSubReferencing=true
!! wikitext
[Book A]
[Book B]
!! html/php
[1.1][2.1][1.1][2.1]
!! html/parsoid
[1.1][2.1][1.2][2.2]
- Book A
- ↑ p1
- ↑ p1
- Book B
- ↑ p1
- ↑ p1
!! end
# T406467: Parsoid doesn't do any merging yet
!! test
Merging sub-refs should not suppress error message for mismatching dir
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
!! html/php
[1.1]
[1.1]
- ↑ Book Cite error: One of the
<ref> tags with the name "a" does have a conflicting dir attribute.
- ↑ 1.0 1.1 p1
!! end
# T406467: Parsoid doesn't do any merging yet
!! test
Merging sub-refs should not suppress error message for misplaced follow
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
!! html/php
[1.1]
Cite error: A <ref follow="…"> tag that is the continuation of a previous one cannot be named individually or have details.
!! end
# T406467: Parsoid doesn't do any merging yet
!! test
Merging sub-refs should not suppress error message for conflicting main content
!! config
wgCiteSubReferencing=true
!! wikitext
[Book]
[conflict]
!! html/php
[1.1]
[1.1]
- ↑ Book Cite error: Invalid
<ref> tag; name "a" defined multiple times with different content
- ↑ 1.0 1.1 p1
!! end
# TODO: Specify desired behavior. Bad round-trip.
!! test
Using `follow` with details on the "main" part
!! config
wgCiteSubReferencing=true
!! options
parsoid=wt2html
!! wikitext
[Book]
[continued]
!! html/php
[1.1]
- ↑ Book continued
- ↑ page 1
!! html/parsoid
[1.1] [1]
!! end
# T390974: Bad refs don't round-trip
!! test
Using `follow` with details on the "follow" part
!! config
wgCiteSubReferencing=true
!! wikitext
[Book] [continued]
!! html/php
[1] Cite error: A <ref follow="…"> tag that is the continuation of a previous one cannot be named individually or have details.
!! html/parsoid
[1] [1]
!! end
!! test
Details include basic wikitext syntax
!! config
wgCiteSubReferencing=true
!! wikitext
[def]
!! html/php
[1.1]
!! html/parsoid
[1.1]
!! end
!! test
Details include template invocation
!! config
wgCiteSubReferencing=true
!! wikitext
[def]
!! html/php
[1.1]
!! html/parsoid
[1.1]
!! end
# TODO: Should be blocked with a fatal, identical to how the main content behaves; see T380979
!! test
Details include another, nested ref tag
!! config
wgCiteSubReferencing=true
!! options
parsoid=wt2html
!! wikitext
[x]
[a]
!! html/php
[1]
[2.1]
!! html/parsoid
[1] [2.1]
!! end
!! test
Subreference doesn't affect main reference numbering
!! config
wgCiteSubReferencing=true
!! wikitext
[abc] [ghi] [jkl]
!! html/php
[1] [2.1] [3]
!! html/parsoid
[1] [2.1] [3]
!! end
# T390961: fails to round-trip main+details after main
!! test
Subreference of existing ref doesn't affect main reference numbering
!! config
wgCiteSubReferencing=true
!! options
parsoid=wt2html
!! wikitext
[abc] [abc] [jkl]
!! html/php
[1] [1.1] [2]
!! html/parsoid
[1] [1.1] [2]
!! end
!! test
Rolling back a sub-reference inside the #tag:references function
!! config
wgCiteSubReferencing=true
!! wikitext
{{#tag:references|[a][b]}}
!! html/php
[1]
Cite error: <ref> tag with name "b" cannot use details when inside <references>.
!! html/parsoid
[1]
!! end
!! test
Named main ref with inline details and called with #tag
!! config
wgCiteSubReferencing=true
!! wikitext
[The book] [Another book]
{{#tag:references}}
!! html
[1.1] [2]
- ↑ The book
- ↑ p. 1
- ↑ Another book
!! html/parsoid
[1.1] [2]
- The book
- ↑ p. 1
- ↑ Another book
!! end
# T389929 We don't want Parsoid to convert a synthetic list defined refs into ref tags
!! test
Synthetic main refs from VE dont convert to list defined refs
!! config
wgCiteSubReferencing=true
!! options
parsoid=html2wt
!! wikitext
[Miller]
[Smith]
!! html/parsoid
[1.1]
[2]
!! end
!! test
T406002: Selser detects edits to the main part of a main+details
!! config
wgCiteSubReferencing=true
!! options
parsoid={
"modes": ["selser"],
"changes": [["#x", "remove"]],
"selser": "noauto"
}
!! wikitext
[Originalbody]
!! wikitext/edited
[body]
!! html/parsoid
!! end