Module talk:TaxonItalics/moretestcases: Difference between revisions

Content deleted Content added
Created page with 'to be completed'
 
Fix Linter errors. Let's not demonstrate invalid syntax if we don't have to.
 
(19 intermediate revisions by one other user not shown)
Line 1:
See also [[Module talk:TaxonItalics/testcases]].
to be completed
 
;Issues
* By default, a parenthesized part of a taxon name is assumed to be a subgenus, and so is italicized. This is correct for {{#invoke:TaxonItalics|main|Mus (Mus)|linked=yes}}, but not for {{#invoke:TaxonItalics|main|Mus (subgenus)|abbreviated=no|linked=yes}}. The disambiguation term can be left unitalicized by using {{para|dab|yes}}. Can these two cases be distinguished automatically?
* "Quoted" genus names are not handled correctly. In {{#invoke:TaxonItalics|main|"Dryosaurus" grandis|abbreviated=no|linked=yes}} and {{#invoke:TaxonItalics|main|"Dryosaurus" grandis|abbreviated=yes|linked=no}}, the double quote marks should ideally not be italicized.
* What about <code><nowiki>{{#invoke:TaxonItalics|main|Felis|abbreviated=yes|linked=no}}</nowiki></code> → {{#invoke:TaxonItalics|main|Felis|abbreviated=yes|linked=no}} – doesn't abbreviate unless it appears to be a binomial.
 
{| class="wikitable"
|+ Comparison of live and sandbox versions of [[Module:TaxonItalics]]{{!}}main
! input !! live !! sandbox
|-
| <nowiki>{{#invoke:TaxonItalics|main|Acer tataricum subsp. ginnala}}</nowiki> || {{#invoke:TaxonItalics|main|Acer tataricum subsp. ginnala}} || {{#invoke:TaxonItalics/sandbox|main|Acer tataricum subsp. ginnala}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus subg. Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|Pinus subg. Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|Pinus subg. Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus subgenus Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|Pinus subgenus Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|Pinus subgenus Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|P. subg. Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|P. subg. Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|P. subg. Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus sect. Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|Pinus sect. Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|Pinus sect. Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus section Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|Pinus section Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|Pinus section Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|P. sect. Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|P. sect. Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|P. sect. Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus subsect. Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|Pinus subsect. Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|Pinus subsect. Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Quercus series Virentes}}</nowiki> || {{#invoke:TaxonItalics|main|Quercus series Virentes}}|| {{#invoke:TaxonItalics/sandbox|main|Quercus series Virentes}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Banksia subser. Banksia}}</nowiki> || {{#invoke:TaxonItalics|main|Banksia subser. Banksia}}|| {{#invoke:TaxonItalics/sandbox|main|Banksia subser. Banksia}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Banksia subseries Banksia}}</nowiki> || {{#invoke:TaxonItalics|main|Banksia subseries Banksia}}|| {{#invoke:TaxonItalics/sandbox|main|Banksia subseries Banksia}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Acer tataricum subsp. ginnala}}</nowiki> || {{#invoke:TaxonItalics|main|Acer tataricum subsp. ginnala}}|| {{#invoke:TaxonItalics/sandbox|main|Acer tataricum subsp. ginnala}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Aster ericoides var. ericoides}}</nowiki> || {{#invoke:TaxonItalics|main|Aster ericoides var. ericoides}}|| {{#invoke:TaxonItalics/sandbox|main|Aster ericoides var. ericoides}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|A. ericoides varietas ericoides}}</nowiki> || {{#invoke:TaxonItalics|main|A. ericoides varietas ericoides}}|| {{#invoke:TaxonItalics/sandbox|main|A. ericoides varietas ericoides}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|A. e. subvar. ericoides}}</nowiki> || {{#invoke:TaxonItalics|main|A. e. subvar. ericoides}}|| {{#invoke:TaxonItalics/sandbox|main|A. e. subvar. ericoides}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Mus (Mus)|linked=yes}}</nowiki> || {{#invoke:TaxonItalics|main|Mus (Mus)|linked=yes}}|| {{#invoke:TaxonItalics/sandbox|main|Mus (Mus)|linked=yes}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Caia (plant)|abbreviated=no|linked=yes|dab=yes}}</nowiki> || {{#invoke:TaxonItalics|main|Caia (plant)|abbreviated=no|linked=yes|dab=yes}}|| {{#invoke:TaxonItalics/sandbox|main|Caia (plant)|abbreviated=no|linked=yes|dab=yes}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Bunyavirales|linked=yes}}</nowiki> || {{#invoke:TaxonItalics|main|Bunyavirales|linked=yes}}|| {{#invoke:TaxonItalics/sandbox|main|Bunyavirales|linked=yes}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Acer tataricum subsp. ginnala|abbreviated=yes}}</nowiki> || {{#invoke:TaxonItalics|main|Acer tataricum subsp. ginnala|abbreviated=yes}}|| {{#invoke:TaxonItalics/sandbox|main|Acer tataricum subsp. ginnala|abbreviated=yes}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Acer tataricum subsp. ginnala|abbreviated=yes|linked=yes}}</nowiki> || {{#invoke:TaxonItalics|main|Acer tataricum subsp. ginnala|abbreviated=yes|linked=yes}}|| {{#invoke:TaxonItalics/sandbox|main|Acer tataricum subsp. ginnala|abbreviated=yes|linked=yes}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|"Dryosaurus" grandis|abbreviated=yes|linked=yes}}</nowiki> || {{#invoke:TaxonItalics|main|"Dryosaurus" grandis|abbreviated=yes|linked=yes}}|| {{#invoke:TaxonItalics/sandbox|main|"Dryosaurus" grandis|abbreviated=yes|linked=yes}}
|-
|colspan=2|<strong>Has internal italic markup – remove and process as if absent</strong>
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus ''subg.'' Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|Pinus ''subg.'' Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|Pinus ''subg.'' Pinus}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus subg.'' Pinus}}</nowiki> || {{#invoke:TaxonItalics|main|Pinus subg.'' Pinus}}|| {{#invoke:TaxonItalics/sandbox|main|Pinus subg.'' Pinus}}
|-
|colspan=2|<strong>Already has italic markup at the start and/or end – return unchanged</strong>
|-
|<nowiki>{{#invoke:TaxonItalics|main|''Pinus sylvestris''}}</nowiki> || {{#invoke:TaxonItalics|main|''Pinus sylvestris''}}|| {{#invoke:TaxonItalics/sandbox|main|''Pinus sylvestris''}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|''Pinus'' subg. ''Pinus''}}</nowiki> || {{#invoke:TaxonItalics|main|''Pinus'' subg. ''Pinus''}}|| {{#invoke:TaxonItalics/sandbox|main|''Pinus'' subg. ''Pinus''}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|''Pinus subg. Pinus''}}</nowiki> || {{#invoke:TaxonItalics|main|''Pinus subg. Pinus''}}|| {{#invoke:TaxonItalics/sandbox|main|''Pinus subg. Pinus''}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|''Pinus'' '''subg.''' ''Pinus''}}</nowiki> || {{#invoke:TaxonItalics|main|''Pinus'' '''subg.''' ''Pinus''}} || {{#invoke:TaxonItalics/sandbox|main|''Pinus'' '''subg.''' ''Pinus''}}
|-
|<nowiki>{{#invoke:TaxonItalics|main|''Pinus subg. Pinus}} text after''</nowiki> || {{#invoke:TaxonItalics|main|''Pinus subg. Pinus}} text after''|| {{#invoke:TaxonItalics/sandbox|main|''Pinus subg. Pinus}} text after''
|-
|<nowiki>{{#invoke:TaxonItalics|main|Pinus subg. Pinus''}} text after''</nowiki> || {{#invoke:TaxonItalics|main|Pinus subg. Pinus''}} text after''|| {{#invoke:TaxonItalics/sandbox|main|Pinus subg. Pinus''}} text after''
|-
|colspan=2|<strong>Starts with [ – return unchanged</strong>
|-
|<nowiki>{{#invoke:TaxonItalics|main|[[Cyclamen#Subgenus Cyclamen|''Cyclamen'' subg. ''Cyclamen'']]}}</nowiki> || {{#invoke:TaxonItalics|main|[[Cyclamen#Subgenus Cyclamen|''Cyclamen'' subg. ''Cyclamen'']]}}|| {{#invoke:TaxonItalics/sandbox|main|[[Cyclamen#Subgenus Cyclamen|''Cyclamen'' subg. ''Cyclamen'']]}}
|}