Text to HTML: Difference between revisions

Rename Perl 6 -> Raku, alphabetize, minor clean-up
(→‎{{header|Perl 6}}: Add a Perl 6 example)
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
Line 126:
</body>
</html></lang>
 
=={{header|Perl 6}}==
{{works with|Rakudo|2019.11}}
The task specs are essentially non-existent. "Make a best guess at how to render mark-up free text"? Anything that could be trusted at all would either be extremely trivial or insanely complex. And it shows by the the task example writers staying away in droves. Five examples after seven years!?
 
Rather than waste time on that noise, I'll demonstrate POD6 to HTML conversion. POD6 is a simple, text-only mark-up used for Perl 6 documentation. (It's Plain Old Documentation for perl 6) It uses pretty simple textual markup and has multiple tools to convert the POD6 document in to many other formats, HTML among them.
 
It is '''not''' markup free, but it is actually usable in production.
<lang perl6>use Pod::To::HTML;
use HTML::Escape;
 
my $pod6 = q:to/POD6/;
=begin pod
 
A very simple Pod6 document.
 
This is a very high-level, hand-wavey overview. There are I<lots> of other
options available.
 
=head1 Section headings
 
=head1 A top level heading
 
=head2 A second level heading
 
=head3 A third level heading
 
=head4 A fourth level heading
 
=head1 Text
 
Ordinary paragraphs do not require an explicit marker or delimiters.
 
Alternatively, there is also an explicit =para marker that can be used to
explicitly mark a paragraph.
 
=para
This is an ordinary paragraph.
Its text will be squeezed and
short lines filled.
 
=head1 Code
 
Enclose code in a =code block (or V<C< >> markup for short, inline samples)
 
=begin code
my $name = 'Rakudo';
say $name;
=end code
 
=head1 Lists
 
=head3 Unordered lists
 
=item Grumpy
=item Dopey
=item Doc
=item Happy
=item Bashful
=item Sneezy
=item Sleepy
 
=head3 Multi-level lists
 
=item1 Animal
=item2 Vertebrate
=item2 Invertebrate
 
=item1 Phase
=item2 Solid
=item2 Liquid
=item2 Gas
 
=head1 Formatting codes
 
Formatting codes provide a way to add inline mark-up to a piece of text.
 
All Pod6 formatting codes consist of a single capital letter followed
immediately by a set of single or double angle brackets; Unicode double angle
brackets may be used.
 
Formatting codes may nest other formatting codes.
 
There are many formatting codes available, some of the more common ones:
 
=item1 V<B< >> Bold
=item1 V<I< >> Italic
=item1 V<U< >> Underline
=item1 V<C< >> Code
=item1 V<L< >> Hyperlink
=item1 V<V< >> Verbatim (Don't interpret anything inside as POD markup)
 
=head1 Tables
 
There is quite extensive markup to allow rendering tables.
 
A simple example:
 
=begin table :caption<Mystery Men>
The Shoveller Eddie Stevens King Arthur's singing shovel
Blue Raja Geoffrey Smith Master of cutlery
Mr Furious Roy Orson Ticking time bomb of fury
The Bowler Carol Pinnsler Haunted bowling ball
=end table
 
=end pod
POD6
 
# for display on Rosettacode
say escape-html render($pod6);
 
# normally
#say render($pod6);</lang>
 
{{out|Returns something like}}
<pre>&lt;!doctype html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;meta charset=&quot;UTF-8&quot; /&gt;
&lt;style&gt;
kbd &#123; font-family: &quot;Droid Sans Mono&quot;, &quot;Luxi Mono&quot;, &quot;Inconsolata&quot;, monospace &#125;
samp &#123; font-family: &quot;Terminus&quot;, &quot;Courier&quot;, &quot;Lucida Console&quot;, monospace &#125;
u &#123; text-decoration: none &#125;
.nested &#123;
margin-left: 3em;
&#125;
aside, u &#123; opacity: 0.7 &#125;
a[id^=&quot;fn-&quot;]:target &#123; background: #ff0 &#125;
&lt;/style&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;//design.perl6.org/perl.css&quot;&gt;
 
&lt;/head&gt;
&lt;body class=&quot;pod&quot;&gt;
&lt;div id=&quot;___top&quot;&gt;&lt;/div&gt;
 
&lt;nav class=&quot;indexgroup&quot;&gt;
&lt;table id=&quot;TOC&quot;&gt;
&lt;caption&gt;&lt;h2 id=&quot;TOC_Title&quot;&gt;Table of Contents&lt;/h2&gt;&lt;/caption&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Section_headings&quot;&gt;Section headings&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#A_top_level_heading&quot;&gt;A top level heading&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-2&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;2.1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#A_second_level_heading&quot;&gt;A second level heading&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-3&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;2.1.1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#A_third_level_heading&quot;&gt;A third level heading&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-4&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;2.1.1.1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#A_fourth_level_heading&quot;&gt;A fourth level heading&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;3&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Text&quot;&gt;Text&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;4&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Code&quot;&gt;Code&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;5&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Lists&quot;&gt;Lists&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-3&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;5.0.1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Unordered_lists&quot;&gt;Unordered lists&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-3&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;5.0.2&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Multi-level_lists&quot;&gt;Multi-level lists&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;6&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Formatting_codes&quot;&gt;Formatting codes&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Tables&quot;&gt;Tables&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/nav&gt;
 
&lt;div class=&quot;pod-body&quot;&gt;
&lt;p&gt;A very simple Pod6 document.&lt;/p&gt;
&lt;p&gt;This is a very high-level, hand-wavey overview. There are &lt;em&gt;lots&lt;/em&gt; of other options available.&lt;/p&gt;
&lt;h1 id=&quot;Section_headings&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Section headings&lt;/a&gt;&lt;/h1&gt;
&lt;h1 id=&quot;A_top_level_heading&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;A top level heading&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id=&quot;A_second_level_heading&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;A second level heading&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;A_third_level_heading&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;A third level heading&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;A_fourth_level_heading&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;A fourth level heading&lt;/a&gt;&lt;/h4&gt;
&lt;h1 id=&quot;Text&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Text&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Ordinary paragraphs do not require an explicit marker or delimiters.&lt;/p&gt;
&lt;p&gt;Alternatively, there is also an explicit =para marker that can be used to explicitly mark a paragraph.&lt;/p&gt;
&lt;p&gt;This is an ordinary paragraph. Its text will be squeezed and short lines filled.&lt;/p&gt;
&lt;h1 id=&quot;Code&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Code&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Enclose code in a =code block (or C&amp;lt; &amp;gt; markup for short, inline samples)&lt;/p&gt;
&lt;pre class=&quot;pod-block-code&quot;&gt; my $name = &amp;#39;Rakudo&amp;#39;;
say $name;
&lt;/pre&gt;
&lt;h1 id=&quot;Lists&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Lists&lt;/a&gt;&lt;/h1&gt;
&lt;h3 id=&quot;Unordered_lists&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Unordered lists&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;Grumpy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dopey&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Doc&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Happy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bashful&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sneezy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sleepy&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;Multi-level_lists&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Multi-level lists&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;Animal&lt;/p&gt;
&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;Vertebrate&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Invertebrate&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;p&gt;Phase&lt;/p&gt;
&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;Solid&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Liquid&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gas&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;Formatting_codes&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Formatting codes&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Formatting codes provide a way to add inline mark-up to a piece of text.&lt;/p&gt;
&lt;p&gt;All Pod6 formatting codes consist of a single capital letter followed immediately by a set of single or double angle brackets; Unicode double angle brackets may be used.&lt;/p&gt;
&lt;p&gt;Formatting codes may nest other formatting codes.&lt;/p&gt;
&lt;p&gt;There are many formatting codes available, some of the more common ones:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;B&amp;lt; &amp;gt; Bold&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I&amp;lt; &amp;gt; Italic&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;U&amp;lt; &amp;gt; Underline&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;C&amp;lt; &amp;gt; Code&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;L&amp;lt; &amp;gt; Hyperlink&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;V&amp;lt; &amp;gt; Verbatim (Don&amp;#39;t interpret anything inside as POD markup)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;Tables&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Tables&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;There is quite extensive markup to allow rendering tables.&lt;/p&gt;
&lt;p&gt;A simple example:&lt;/p&gt;
&lt;table class=&quot;pod-table&quot;&gt;
&lt;caption&gt;Mystery Men&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;The Shoveller&lt;/td&gt; &lt;td&gt;Eddie Stevens&lt;/td&gt; &lt;td&gt;King Arthur&amp;#39;s singing shovel&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Blue Raja&lt;/td&gt; &lt;td&gt;Geoffrey Smith&lt;/td&gt; &lt;td&gt;Master of cutlery&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Mr Furious&lt;/td&gt; &lt;td&gt;Roy Orson&lt;/td&gt; &lt;td&gt;Ticking time bomb of fury&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;The Bowler&lt;/td&gt; &lt;td&gt;Carol Pinnsler&lt;/td&gt; &lt;td&gt;Haunted bowling ball&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
 
&lt;/body&gt;
&lt;/html&gt;</pre>
 
=={{header|Phix}}==
Line 622 ⟶ 384:
&lt;/ul&gt;
</pre>
 
=={{header|Raku}}==
(formerly Perl 6)
{{works with|Rakudo|2019.11}}
The task specs are essentially non-existent. "Make a best guess at how to render mark-up free text"? Anything that could be trusted at all would either be extremely trivial or insanely complex. And it shows by the the task example writers staying away in droves. Five examples after seven years!?
 
Rather than waste time on that noise, I'll demonstrate POD6 to HTML conversion. POD6 is a simple, text-only mark-up used for Perl 6 documentation. (It's Plain Old Documentation for perl 6) It uses pretty simple textual markup and has multiple tools to convert the POD6 document in to many other formats, HTML among them.
 
It is '''not''' markup free, but it is actually usable in production.
<lang perl6>use Pod::To::HTML;
use HTML::Escape;
 
my $pod6 = q:to/POD6/;
=begin pod
 
A very simple Pod6 document.
 
This is a very high-level, hand-wavey overview. There are I<lots> of other
options available.
 
=head1 Section headings
 
=head1 A top level heading
 
=head2 A second level heading
 
=head3 A third level heading
 
=head4 A fourth level heading
 
=head1 Text
 
Ordinary paragraphs do not require an explicit marker or delimiters.
 
Alternatively, there is also an explicit =para marker that can be used to
explicitly mark a paragraph.
 
=para
This is an ordinary paragraph.
Its text will be squeezed and
short lines filled.
 
=head1 Code
 
Enclose code in a =code block (or V<C< >> markup for short, inline samples)
 
=begin code
my $name = 'Rakudo';
say $name;
=end code
 
=head1 Lists
 
=head3 Unordered lists
 
=item Grumpy
=item Dopey
=item Doc
=item Happy
=item Bashful
=item Sneezy
=item Sleepy
 
=head3 Multi-level lists
 
=item1 Animal
=item2 Vertebrate
=item2 Invertebrate
 
=item1 Phase
=item2 Solid
=item2 Liquid
=item2 Gas
 
=head1 Formatting codes
 
Formatting codes provide a way to add inline mark-up to a piece of text.
 
All Pod6 formatting codes consist of a single capital letter followed
immediately by a set of single or double angle brackets; Unicode double angle
brackets may be used.
 
Formatting codes may nest other formatting codes.
 
There are many formatting codes available, some of the more common ones:
 
=item1 V<B< >> Bold
=item1 V<I< >> Italic
=item1 V<U< >> Underline
=item1 V<C< >> Code
=item1 V<L< >> Hyperlink
=item1 V<V< >> Verbatim (Don't interpret anything inside as POD markup)
 
=head1 Tables
 
There is quite extensive markup to allow rendering tables.
 
A simple example:
 
=begin table :caption<Mystery Men>
The Shoveller Eddie Stevens King Arthur's singing shovel
Blue Raja Geoffrey Smith Master of cutlery
Mr Furious Roy Orson Ticking time bomb of fury
The Bowler Carol Pinnsler Haunted bowling ball
=end table
 
=end pod
POD6
 
# for display on Rosettacode
say escape-html render($pod6);
 
# normally
#say render($pod6);</lang>
 
{{out|Returns something like}}
<pre>&lt;!doctype html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;meta charset=&quot;UTF-8&quot; /&gt;
&lt;style&gt;
kbd &#123; font-family: &quot;Droid Sans Mono&quot;, &quot;Luxi Mono&quot;, &quot;Inconsolata&quot;, monospace &#125;
samp &#123; font-family: &quot;Terminus&quot;, &quot;Courier&quot;, &quot;Lucida Console&quot;, monospace &#125;
u &#123; text-decoration: none &#125;
.nested &#123;
margin-left: 3em;
&#125;
aside, u &#123; opacity: 0.7 &#125;
a[id^=&quot;fn-&quot;]:target &#123; background: #ff0 &#125;
&lt;/style&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;//design.perl6.org/perl.css&quot;&gt;
 
&lt;/head&gt;
&lt;body class=&quot;pod&quot;&gt;
&lt;div id=&quot;___top&quot;&gt;&lt;/div&gt;
 
&lt;nav class=&quot;indexgroup&quot;&gt;
&lt;table id=&quot;TOC&quot;&gt;
&lt;caption&gt;&lt;h2 id=&quot;TOC_Title&quot;&gt;Table of Contents&lt;/h2&gt;&lt;/caption&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Section_headings&quot;&gt;Section headings&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;2&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#A_top_level_heading&quot;&gt;A top level heading&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-2&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;2.1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#A_second_level_heading&quot;&gt;A second level heading&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-3&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;2.1.1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#A_third_level_heading&quot;&gt;A third level heading&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-4&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;2.1.1.1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#A_fourth_level_heading&quot;&gt;A fourth level heading&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;3&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Text&quot;&gt;Text&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;4&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Code&quot;&gt;Code&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;5&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Lists&quot;&gt;Lists&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-3&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;5.0.1&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Unordered_lists&quot;&gt;Unordered lists&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-3&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;5.0.2&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Multi-level_lists&quot;&gt;Multi-level lists&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;6&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Formatting_codes&quot;&gt;Formatting codes&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;toc-level-1&quot;&gt;&lt;td class=&quot;toc-number&quot;&gt;7&lt;/td&gt;&lt;td class=&quot;toc-text&quot;&gt;&lt;a href=&quot;#Tables&quot;&gt;Tables&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/nav&gt;
 
&lt;div class=&quot;pod-body&quot;&gt;
&lt;p&gt;A very simple Pod6 document.&lt;/p&gt;
&lt;p&gt;This is a very high-level, hand-wavey overview. There are &lt;em&gt;lots&lt;/em&gt; of other options available.&lt;/p&gt;
&lt;h1 id=&quot;Section_headings&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Section headings&lt;/a&gt;&lt;/h1&gt;
&lt;h1 id=&quot;A_top_level_heading&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;A top level heading&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id=&quot;A_second_level_heading&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;A second level heading&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;A_third_level_heading&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;A third level heading&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;A_fourth_level_heading&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;A fourth level heading&lt;/a&gt;&lt;/h4&gt;
&lt;h1 id=&quot;Text&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Text&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Ordinary paragraphs do not require an explicit marker or delimiters.&lt;/p&gt;
&lt;p&gt;Alternatively, there is also an explicit =para marker that can be used to explicitly mark a paragraph.&lt;/p&gt;
&lt;p&gt;This is an ordinary paragraph. Its text will be squeezed and short lines filled.&lt;/p&gt;
&lt;h1 id=&quot;Code&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Code&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Enclose code in a =code block (or C&amp;lt; &amp;gt; markup for short, inline samples)&lt;/p&gt;
&lt;pre class=&quot;pod-block-code&quot;&gt; my $name = &amp;#39;Rakudo&amp;#39;;
say $name;
&lt;/pre&gt;
&lt;h1 id=&quot;Lists&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Lists&lt;/a&gt;&lt;/h1&gt;
&lt;h3 id=&quot;Unordered_lists&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Unordered lists&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;Grumpy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dopey&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Doc&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Happy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bashful&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sneezy&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sleepy&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;Multi-level_lists&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Multi-level lists&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;Animal&lt;/p&gt;
&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;Vertebrate&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Invertebrate&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;p&gt;Phase&lt;/p&gt;
&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;Solid&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Liquid&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gas&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;Formatting_codes&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Formatting codes&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Formatting codes provide a way to add inline mark-up to a piece of text.&lt;/p&gt;
&lt;p&gt;All Pod6 formatting codes consist of a single capital letter followed immediately by a set of single or double angle brackets; Unicode double angle brackets may be used.&lt;/p&gt;
&lt;p&gt;Formatting codes may nest other formatting codes.&lt;/p&gt;
&lt;p&gt;There are many formatting codes available, some of the more common ones:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;p&gt;B&amp;lt; &amp;gt; Bold&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I&amp;lt; &amp;gt; Italic&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;U&amp;lt; &amp;gt; Underline&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;C&amp;lt; &amp;gt; Code&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;L&amp;lt; &amp;gt; Hyperlink&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;V&amp;lt; &amp;gt; Verbatim (Don&amp;#39;t interpret anything inside as POD markup)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;Tables&quot;&gt;&lt;a class=&quot;u&quot; href=&quot;#___top&quot; title=&quot;go to top of document&quot;&gt;Tables&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;There is quite extensive markup to allow rendering tables.&lt;/p&gt;
&lt;p&gt;A simple example:&lt;/p&gt;
&lt;table class=&quot;pod-table&quot;&gt;
&lt;caption&gt;Mystery Men&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;The Shoveller&lt;/td&gt; &lt;td&gt;Eddie Stevens&lt;/td&gt; &lt;td&gt;King Arthur&amp;#39;s singing shovel&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Blue Raja&lt;/td&gt; &lt;td&gt;Geoffrey Smith&lt;/td&gt; &lt;td&gt;Master of cutlery&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Mr Furious&lt;/td&gt; &lt;td&gt;Roy Orson&lt;/td&gt; &lt;td&gt;Ticking time bomb of fury&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;The Bowler&lt;/td&gt; &lt;td&gt;Carol Pinnsler&lt;/td&gt; &lt;td&gt;Haunted bowling ball&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
 
&lt;/body&gt;
&lt;/html&gt;</pre>
 
=={{header|Tcl}}==
10,333

edits