Content deleted Content added
→wikicite: new section |
ce |
||
(18 intermediate revisions by 3 users not shown) | |||
Line 1:
'''This talk page has been usurped to be a testcases page for development. To talk about this module, please do so at [[Module talk:Footnotes]].'''
{{TOC right}}
There has always been a problem with the {{tlx|harv}} and {{tlx|sfn}} families of templates: except that every link that is created by these templates is tested at creation, editors don't know if the link works. A remedy for that has been user-scripts like [[User:Ucucha/HarvErrors]]. But, not all editors use that script so broken harv links can go undetected for a long time. At the moment, there is [[Wikipedia:Bots/Requests_for_approval/AntiCompositeBot|prospective bot]] that would mark broken-link harv templates by adding {{tlx|broken footnote}} after the broken-link harv template.
I have another possible solution. I have created a [[Module:Sandbox/trappist the monk/harv link test|lua module]] that extracts reference linking data from cs1|2
:the harv template does not have a matching citation template
:more than one citation template matches the harv template
Line 251 ⟶ 254:
|}
==ref=<nowiki>{{sfnref
{| class="wikitable" width="100%"
|+{{pipe}}ref={{tl|sfnref}} and {{pipe}}ref={{tl|harvid}}
Line 270 ⟶ 273:
| <code><nowiki>{{Cite book |title=Title |ref={{harvid|Blue|2020}}}}</nowiki></code> || {{Cite book |title=Title |ref={{harvid|Blue|2020}}}}
|-
! colspan="2" | {{tlf|
|-
| <code><nowiki>{{Cite book |title=Title |ref={{
|-
! colspan="2" | {{tlf|sfnref}}
Line 508 ⟶ 511:
|-
| <code><nowiki>{{Cite book |date={{ISOtoMOS|2020-03-05}} |last=Gray |last2=White |title=Title |ref=harv}}</nowiki></code> || {{Cite book |date={{ISOtoMOS|2020-03-05}} |last=Gray |last2=White |title=Title |ref=harv}}
|}
Line 602 ⟶ 562:
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Anon.|n.d.(a)}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Anon.|n.d.(a)}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Atwood|2003|ref=Reference-{{sfnref|Atwood|2003}}}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Atwood|2003|ref=Reference-{{sfnref|Atwood|2003}}}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Atwood|2003}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Atwood|2003}}
|-
! colspan="2" | {{pipe}}id=
Line 609 ⟶ 573:
! colspan="2" | {{pipe}}ref=
|-
| <code><nowiki>{{wikicite|ref={{
|-
! colspan="2" | {{pipe}}id=sfnref
|-
|<code><nowiki>{{wikicite | id = {{sfnref|Atwood|2003}} | reference = Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. {{ISBN|978-0-7710-0868-9}}. }}</nowiki></code> || {{wikicite | id = {{sfnref|Atwood|2003}} | reference = Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. {{ISBN|978-0-7710-0868-9}}. }}
|-
! colspan="2" | {{pipe}}ref=sfnref
|-
|<code><nowiki>{{wikicite | ref = {{sfnref|Atwood|2003}} | reference = Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. {{ISBN|978-0-7710-0868-9}}. }}</nowiki></code> || {{wikicite | ref = {{sfnref|Atwood|2003}} | reference = Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. {{ISBN|978-0-7710-0868-9}}. }}
|}
== anchor ==
{| class="wikitable" width="100%"
|+{{tl|anchor}}
!template !! rendering
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Blue|Yellow|2018}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Blue|Yellow|2018}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|plain text|ref=plain text}}</nowiki></code> || {{Harvard citation no brackets/sandbox|plain text|ref=plain text}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|CITEREF|citeref|2030|ref=CITEREFciteref2030}}}}</nowiki></code> || {{Harvard citation no brackets/sandbox|CITEREF|citeref|2030|ref=CITEREFciteref2030}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Yellow|Blue|2019}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Yellow|Blue|2019}}
|-
! colspan="2" | multiple anchors
|-
| <code><nowiki>{{anchor|{{sfnref|Blue|Yellow|2018}}|plain text|CITEREFciteref2030|{{sfnref|Yellow|Blue|2019}}}}</nowiki></code> || {{anchor|{{sfnref|Blue|Yellow|2018}}|plain text|CITEREFciteref2030|{{sfnref|Yellow|Blue|2019}}}} anchors are here
|}
==miscellaneous tests==
For these tests, consult the lua logs section of the debug console. To see that, edit this page and click Show preview. At the bottom, click Parser profiling data and then click show under Lua logs.
=== sfn whitelist ===
{{sfn whitelist|CITEREFBrand1968|CITEREFFine1994|CITEREFGeanakoplos1959|CITEREFVan_Tricht2011}}
This section has this template:
:<code><nowiki>{{sfn whitelist|CITEREFBrand1968|CITEREFFine1994|CITEREFGeanakoplos1959|CITEREFVan_Tricht2011}}</nowiki></code>
These four anchor IDs should appear in the <code>article_whitelist</code> table in the lua logs section of the debug console.
=== parser functions ===
This section has this template:
:<code><nowiki>{{#language:nv|en}}</nowiki></code> → {{#language:nv|en}}
parser functions should not appear in the <code>template_list</code> table in the lua logs section of the debug console.
==dynamic whitelisting==
{| class="wikitable" width="100%"
|+dynamic whitelisting
!template !! rendering
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Adamson|Mitchell|1911|p=135}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Adamson|Mitchell|1911|p=135}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Jones|Bryant|1911}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Jones|Bryant|1911}}
|-
! colspan="2" | simple citations
|-
| <code><nowiki>{{EB1911 |mode=cs2 |last=Adamson |first=Robert |author-link=Robert Adamson (philosopher) |last2=Mitchell |first2=John Malcolm |wstitle=Bacon, Francis |volume=3 |pages=135–152 }}</nowiki></code> || {{EB1911 |mode=cs2 |last=Adamson |first=Robert |author-link=Robert Adamson (philosopher) |last2=Mitchell |first2=John Malcolm |wstitle=Bacon, Francis |volume=3 |pages=135–152 }}
|-
| <code><nowiki>{{cite EB1911 |wstitle=Caesar, Gaius Julius |volume=4 |pages=938–943 |first1=Henry Stuart |last1=Jones |first2=Margaret |last2=Bryant |short=1}}</nowiki></code> || {{cite EB1911 |wstitle=Caesar, Gaius Julius |volume=4 |pages=938–943 |first1=Henry Stuart |last1=Jones |first2=Margaret |last2=Bryant |short=1}}
|-
! colspan="2" | cite catholic encyclopedia uses {{pipe}}volume=
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Fanning|1907}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Fanning|1907}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Fanning|1908}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Fanning|1908}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Fanning, William Henry Windsor|1913}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Fanning, William Henry Windsor|1913}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Herbermann|1913}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Herbermann|1913}}
|-
! colspan="2" | volume citations
|-
| <code><nowiki>{{Cite CE1913|wstitle =Baptism |first=William Henry Windsor |last=Fanning|volume=2|ref=harv}}</nowiki></code> || {{Cite CE1913|wstitle =Baptism |first=William Henry Windsor |last=Fanning|volume=2|ref=harv}}
|-
| <code><nowiki>{{Catholic|last=Fanning|first=William H. W.|wstitle=Conservator|volume=4|ref=harv}}</nowiki></code> || {{Catholic|last=Fanning|first=William H. W.|wstitle=Conservator|volume=4|ref=harv}}
|-
| <code><nowiki>{{cathEncy|wstitle=Vicar of Christ|author=Fanning, William Henry Windsor}}</nowiki></code> || {{cathEncy|wstitle=Vicar of Christ|author=Fanning, William Henry Windsor}}
|-
| <code><nowiki>{{Cite CE1913 | wstitle = Ecclesiastical Heraldry}}</nowiki></code> || {{Cite CE1913 | wstitle = Ecclesiastical Heraldry}}
|-
! colspan="2" | cite EB9 uses {{pipe}}volume= allows roman numerals
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Adamson|1878}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Adamson|1878}}
|-
| <code><nowiki>{{Harvard citation no brackets/sandbox|Baynes|1878}}</nowiki></code> || {{Harvard citation no brackets/sandbox|Baynes|1878}}
|-
! colspan="2" | volume citations
|-
| <code><nowiki>{{cite EB9 |last=Adamson |first=Robert |authorlink=Robert Adamson (philosopher) |wstitle=Henry St John, Viscount Bolingbroke |volume=4 |pages=4–7}}</nowiki></code> || {{cite EB9 |last=Adamson |first=Robert |authorlink=Robert Adamson (philosopher) |wstitle=Henry St John, Viscount Bolingbroke |volume=4 |pages=4–7}}
|-
| <code><nowiki>{{eb9 |wstitle=Henry St John, Viscount Bolingbroke |volume=IV |pages=4–7}}</nowiki></code> || {{eb9 |wstitle=Henry St John, Viscount Bolingbroke |volume=IV |pages=4–7}}
|}
|