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

Template:Syntaxhighlight/testcases

From Wikipedia, the free encyclopedia

Live template

[edit]

Bare syntaxhighlight tags

[edit]
<!-- This is a comment; these are not displayed in the browser. -->
<table class="center" style="background-color: ivory; color: maroon; font-family: Arial, sans-serif; font-size: 0.875rem; font-style: italic; font-weight: 700;">
  <tr>
    <th>Heading 1</th>
    <th>Heading 2</th>
  </tr>
  <tr>
    <td style="padding: 10px;">This is cell 1 text</td>
    <td style="padding: 10px;">This is cell 2 text</td>
  </tr>
</table>

Template:Syntaxhighlight invocation

[edit]
<table class="center" style="background-color: ivory; color: maroon; font-family: Arial, sans-serif; font-size: 0.875rem; font-style: italic; font-weight: 700;">
  <tr>
    <th>Heading 1</th>
    <th>Heading 2</th>
  </tr>
  <tr>
    <td style="padding: 10px;">This is cell 1 text</td>
    <td style="padding: 10px;">This is cell 2 text</td>
  </tr>
</table>

Template:Syntaxhighlight/sandbox invocation

[edit]
 <table class="center" style="background-color: ivory; color: maroon; font-family: Arial, sans-serif; font-size: 0.875rem; font-style: italic; font-weight: 700;">
  <tr>
    <th>Heading 1</th>
    <th>Heading 2</th>
  </tr>
  <tr>
    <td style="padding: 10px;">This is cell 1 text</td>
    <td style="padding: 10px;">This is cell 2 text</td>
  </tr>
</table>

Use of inline= parameter to display as inline-block

[edit]
{{Syntaxhighlight|{{CodeCommentary|Python:A language of, by and for the sneks}}|wikitext|inline=true}}

{{Syntaxhighlight}}

This is inline output, so start a sentence…
{{CodeCommentary|Python:A language of, by and for the sneks}}
…and now end the sentence.

{{Syntaxhighlight/sandbox}}

This is inline output, so start a sentence…
 {{CodeCommentary|Python:A language of, by and for the sneks}}
…and now end the sentence.

This is inline output, so start a sentence…{{CodeCommentary|Python:A language of, by and for the sneks}}…and now end the sentence.

Copy parameter test

[edit]
{{Syntaxhighlight|code=<table style="width: 100%;">
 <tr><th>Heading 1</th><th>Heading 2</th></tr>
 <tr><td style="padding: 10px;">This is cell 1 text</td><td style="padding: 10px;">This is cell 2 text</td></tr>
</table> |copy=1 |lang=HTML}}

{{Syntaxhighlight}}

<table style="width: 100%;">
 <tr><th>Heading 1</th><th>Heading 2</th></tr>
 <tr><td style="padding: 10px;">This is cell 1 text</td><td style="padding: 10px;">This is cell 2 text</td></tr>
</table>

{{Syntaxhighlight/sandbox}}

 <table style="width: 100%;">
 <tr><th>Heading 1</th><th>Heading 2</th></tr>
 <tr><td style="padding: 10px;">This is cell 1 text</td><td style="padding: 10px;">This is cell 2 text</td></tr>
</table>