Difference between revisions of "Template:Htm/testcases"

From Gentoo Wiki
Jump to:navigation Jump to:search
(fix pipe case)
(try this)
 
Line 1: Line 1:
 
<noinclude>{{Template testcases notice}}</noinclude>
 
<noinclude>{{Template testcases notice}}</noinclude>
{{Testcase|title=Showing open tag (anonymous parameter)
+
{{Test case|title=Showing open tag (anonymous parameter)
 
|<nowiki>{{Htm|span}}</nowiki>
 
|<nowiki>{{Htm|span}}</nowiki>
 
|        {{Htm|span}}
 
|        {{Htm|span}}
Line 6: Line 6:
 
}}
 
}}
  
{{Testcase|title=Showing open tag with attribute (anonymous parameter)
+
{{Test case|title=Showing open tag with attribute (anonymous parameter)
 
|<nowiki>{{Htm|span style{{=}}"color:red"}}</nowiki>
 
|<nowiki>{{Htm|span style{{=}}"color:red"}}</nowiki>
 
|        {{Htm|span style{{=}}"color:red"}}
 
|        {{Htm|span style{{=}}"color:red"}}
Line 12: Line 12:
 
}}
 
}}
  
{{Testcase|title=Showing open tag with attribute containing a pipe character (anonymous parameter)
+
{{Test case|title=Showing open tag with attribute containing a pipe character (anonymous parameter)
|<nowiki>{{Htm|span title{{=}}"this&amp;#124;that"}}</nowiki>
+
|<nowiki>{{Htm|span title{{=}}"this{{!}}that"}}</nowiki>
|        {{Htm|span title{{=}}"this&#124;that"}}
+
|        {{Htm|span title{{=}}"this{{!}}that"}}
|{{Htm/sandbox|span title{{=}}"this&#124;that"}}
+
|{{Htm/sandbox|span title{{=}}"this{{!}}that"}}
 
}}
 
}}
  
{{Testcase|title=Showing close tag (anonymous parameter)
+
{{Test case|title=Showing close tag (anonymous parameter)
 
|<nowiki>{{Htm|/span}}</nowiki>
 
|<nowiki>{{Htm|/span}}</nowiki>
 
|        {{Htm|/span}}
 
|        {{Htm|/span}}
Line 24: Line 24:
 
}}
 
}}
  
{{Testcase|title=Showing only open and close angle-brackets (no parameter)
+
{{Test case|title=Showing only open and close angle-brackets (no parameter)
 
|<nowiki>{{Htm}}</nowiki>
 
|<nowiki>{{Htm}}</nowiki>
 
|        {{Htm}}
 
|        {{Htm}}
 
|{{Htm/sandbox}}
 
|{{Htm/sandbox}}
 
}}
 
}}

Latest revision as of 08:37, 9 February 2017

Note
This is the template test case page for Template:Htm and its sandbox version. You may have to purge this page to update the examples.
Showing open tag (anonymous parameter)
Wiki code
{{Htm|span}}
Main version
<span>
Sandbox version


Showing open tag with attribute (anonymous parameter)
Wiki code
{{Htm|span style{{=}}"color:red"}}
Main version
<span style="color:red">
Sandbox version


Showing open tag with attribute containing a pipe character (anonymous parameter)
Wiki code
{{Htm|span title{{=}}"this{{!}}that"}}
Main version
<span title="this|that">
Sandbox version


Showing close tag (anonymous parameter)
Wiki code
{{Htm|/span}}
Main version
</span>
Sandbox version


Showing only open and close angle-brackets (no parameter)
Wiki code
{{Htm}}
Main version
<>
Sandbox version