Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module talk:ApplyLinkAnnotations/testcases

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

All 50 tests passed.

test_lines_to_match

test_lines_to_match
TestExpectedActualDiffers at
checkY very indented item
::::*[[loosely related|tangential]]
::::* {{Annotated link |loosely related|tangential}} ::::* {{Annotated link |loosely related|tangential}}
checkY very indented item (Sandbox)
::::*[[loosely related|tangential]]
::::* {{Annotated link |loosely related|tangential}} ::::* {{Annotated link |loosely related|tangential}}
checkY pipe list item
*[[hello|hey]]
* {{Annotated link |hello|hey}} * {{Annotated link |hello|hey}}
checkY pipe list item (Sandbox)
*[[hello|hey]]
* {{Annotated link |hello|hey}} * {{Annotated link |hello|hey}}
checkY section links
*[[Clowns#On Halloween]]
* {{Annotated link |Clowns#On Halloween}} * {{Annotated link |Clowns#On Halloween}}
checkY section links (Sandbox)
*[[Clowns#On Halloween]]
* {{Annotated link |Clowns#On Halloween}} * {{Annotated link |Clowns#On Halloween}}
checkY piped, indented item
:*[[related|renamed]]
:* {{Annotated link |related|renamed}} :* {{Annotated link |related|renamed}}
checkY piped, indented item (Sandbox)
:*[[related|renamed]]
:* {{Annotated link |related|renamed}} :* {{Annotated link |related|renamed}}
checkY accented
*[[El Niño]]
* {{Annotated link |El Niño}} * {{Annotated link |El Niño}}
checkY accented (Sandbox)
*[[El Niño]]
* {{Annotated link |El Niño}} * {{Annotated link |El Niño}}
checkY deep indent with asterisks
** [[Wikitext]]
** {{Annotated link |Wikitext}} ** {{Annotated link |Wikitext}}
checkY deep indent with asterisks (Sandbox)
** [[Wikitext]]
** {{Annotated link |Wikitext}} ** {{Annotated link |Wikitext}}
checkY extra spaces
* [[Dark Matter]]
* {{Annotated link |Dark Matter}} * {{Annotated link |Dark Matter}}
checkY extra spaces (Sandbox)
* [[Dark Matter]]
* {{Annotated link |Dark Matter}} * {{Annotated link |Dark Matter}}
checkY escaped spaces
*[[Afternoon_delight]]
* {{Annotated link |Afternoon_delight}} * {{Annotated link |Afternoon_delight}}
checkY escaped spaces (Sandbox)
*[[Afternoon_delight]]
* {{Annotated link |Afternoon_delight}} * {{Annotated link |Afternoon_delight}}
checkY std list item link
*[[hello]]
* {{Annotated link |hello}} * {{Annotated link |hello}}
checkY std list item link (Sandbox)
*[[hello]]
* {{Annotated link |hello}} * {{Annotated link |hello}}
checkY indented list item
:*[[related]]
:* {{Annotated link |related}} :* {{Annotated link |related}}
checkY indented list item (Sandbox)
:*[[related]]
:* {{Annotated link |related}} :* {{Annotated link |related}}

test_known_caveats

test_known_caveats
TestExpectedActualDiffers at
checkY SEE DOCS: html comments
<!-- wikitext comments -->
<!-- wikitext comments --> <!-- wikitext comments -->
checkY SEE DOCS: html comments (Sandbox)
<!-- wikitext comments -->
<!-- wikitext comments --> <!-- wikitext comments -->
checkY SEE DOCS: single letter article titles
*[[T]]
*[[T]] *[[T]]
checkY SEE DOCS: single letter article titles (Sandbox)
*[[T]]
*[[T]] *[[T]]
checkY SEE DOCS: link extensions
*[[Flower]]y
*[[Flower]]y *[[Flower]]y
checkY SEE DOCS: link extensions (Sandbox)
*[[Flower]]y
*[[Flower]]y *[[Flower]]y

test_lines_to_avoid

test_lines_to_avoid
TestExpectedActualDiffers at
checkY already annotated
* {{Annotated link |hello}}
* {{Annotated link |hello}} * {{Annotated link |hello}}
checkY already annotated (Sandbox)
* {{Annotated link |hello}}
* {{Annotated link |hello}} * {{Annotated link |hello}}
checkY non-article namespace
*[[File:link_to_file]]
*[[File:link_to_file]] *[[File:link_to_file]]
checkY non-article namespace (Sandbox)
*[[File:link_to_file]]
*[[File:link_to_file]] *[[File:link_to_file]]
checkY link at end
*Alternative theories include [[Nonsense]]
*Alternative theories include [[Nonsense]] *Alternative theories include [[Nonsense]]
checkY link at end (Sandbox)
*Alternative theories include [[Nonsense]]
*Alternative theories include [[Nonsense]] *Alternative theories include [[Nonsense]]
checkY indented but non-listed
:[[Cancun]]
:[[Cancun]] :[[Cancun]]
checkY indented but non-listed (Sandbox)
:[[Cancun]]
:[[Cancun]] :[[Cancun]]
checkY reverse pipe trick
*[[|Moscow, Russia]]
*[[|Moscow, Russia]] *[[|Moscow, Russia]]
checkY reverse pipe trick (Sandbox)
*[[|Moscow, Russia]]
*[[|Moscow, Russia]] *[[|Moscow, Russia]]
checkY pipe trick
*[[hello (greeting)|]]
*[[hello (greeting)|]] *[[hello (greeting)|]]
checkY pipe trick (Sandbox)
*[[hello (greeting)|]]
*[[hello (greeting)|]] *[[hello (greeting)|]]
checkY stylized links
*''[[Emphasized link]]''
*''[[Emphasized link]]'' *''[[Emphasized link]]''
checkY stylized links (Sandbox)
*''[[Emphasized link]]''
*''[[Emphasized link]]'' *''[[Emphasized link]]''
checkY non-listed link
[[Mexico]]
[[Mexico]] [[Mexico]]
checkY non-listed link (Sandbox)
[[Mexico]]
[[Mexico]] [[Mexico]]
checkY ordered list
#[[hello]]
#[[hello]] #[[hello]]
checkY ordered list (Sandbox)
#[[hello]]
#[[hello]] #[[hello]]
checkY section headings
== Section heading ==
== Section heading == == Section heading ==
checkY section headings (Sandbox)
== Section heading ==
== Section heading == == Section heading ==
checkY manual annotation
*[[hello]] - an English greeting
*[[hello]] - an English greeting *[[hello]] - an English greeting
checkY manual annotation (Sandbox)
*[[hello]] - an English greeting
*[[hello]] - an English greeting *[[hello]] - an English greeting

test_same_line

test_same_line
TestExpectedActualDiffers at
checkY same line *[[hello]] *[[hello]]

test_one_item_list

test_one_item_list
TestExpectedActualDiffers at
checkY {{#invoke:ApplyLinkAnnotations|bySubstitutionInUnorderedList|List

*[[hello]] }}

List

* {{Annotated link |hello}}

List

* {{Annotated link |hello}}