# Headings
assert 'Heading first Order
============' \
-'<section class="h1" id="1:Heading first Order"><h1>Heading first Order<a class="anchor" href="#1:Heading first Order"></a></h1>
+'<section class="h1" id="1:Heading first Order"><h1>Heading first Order<a class="anchor" href="#1:Heading first Order" aria-label="#1:Heading first Order"></a></h1>
</section>' \
'Heading h1'
assert 'Heading first Order {.foo #bar}
============' \
-'<section class="h1 foo bar" id="1:Heading first Order"><h1 class="foo bar">Heading first Order<a class="anchor" href="#1:Heading first Order"></a></h1>
+'<section class="h1 foo bar" id="1:Heading first Order"><h1 class="foo bar">Heading first Order<a class="anchor" href="#1:Heading first Order" aria-label="#1:Heading first Order"></a></h1>
</section>' \
'Heading h1 + attributes'
assert 'Heading second Order
------------' \
-'<section class="h2" id="0.1:Heading second Order"><h2>Heading second Order<a class="anchor" href="#0.1:Heading second Order"></a></h2>
+'<section class="h2" id="0.1:Heading second Order"><h2>Heading second Order<a class="anchor" href="#0.1:Heading second Order" aria-label="#0.1:Heading second Order"></a></h2>
</section>' \
'Heading h2'
assert 'Heading second Order {.foo #bar}
------------' \
-'<section class="h2 foo bar" id="0.1:Heading second Order"><h2 class="foo bar">Heading second Order<a class="anchor" href="#0.1:Heading second Order"></a></h2>
+'<section class="h2 foo bar" id="0.1:Heading second Order"><h2 class="foo bar">Heading second Order<a class="anchor" href="#0.1:Heading second Order" aria-label="#0.1:Heading second Order"></a></h2>
</section>' \
'Heading h2 + attributes'
assert '#### Heading four' \
-'<section class="h4" id="0.0.0.1:Heading four"><h4>Heading four<a class="anchor" href="#0.0.0.1:Heading four"></a></h4>
+'<section class="h4" id="0.0.0.1:Heading four"><h4>Heading four<a class="anchor" href="#0.0.0.1:Heading four" aria-label="#0.0.0.1:Heading four"></a></h4>
</section>' \
'Heading arbitrary'
assert '###Heading three ######' \
-'<section class="h3" id="0.0.1:Heading three"><h3>Heading three<a class="anchor" href="#0.0.1:Heading three"></a></h3>
+'<section class="h3" id="0.0.1:Heading three"><h3>Heading three<a class="anchor" href="#0.0.1:Heading three" aria-label="#0.0.1:Heading three"></a></h3>
</section>' \
'Heading arbitrary'
assert '### Heading three ## {foo bar}' \
-'<section class="h3 foo bar" id="0.0.1:Heading three"><h3 class="foo bar">Heading three<a class="anchor" href="#0.0.1:Heading three"></a></h3>
+'<section class="h3 foo bar" id="0.0.1:Heading three"><h3 class="foo bar">Heading three<a class="anchor" href="#0.0.1:Heading three" aria-label="#0.0.1:Heading three"></a></h3>
</section>' \
'Heading arbitrary + attributes'
assert '# Heading \# # {foo bar}' \
-'<section class="h1 foo bar" id="1:Heading \#"><h1 class="foo bar">Heading #<a class="anchor" href="#1:Heading \#"></a></h1>
+'<section class="h1 foo bar" id="1:Heading \#"><h1 class="foo bar">Heading #<a class="anchor" href="#1:Heading \#" aria-label="#1:Heading \#"></a></h1>
</section>' \
'Heading arbitrary + attributes'
##sub2 bar {x}
' \
-'<section class="h2" id="0.1:foo"><h2>foo<a class="anchor" href="#0.1:foo"></a></h2>
-</section><section class="h1" id="1:bar"><h1>bar<a class="anchor" href="#1:bar"></a></h1>
-<section class="h2" id="1.1:sub bar"><h2>sub bar<a class="anchor" href="#1.1:sub bar"></a></h2>
-<section class="h3" id="1.1.1:sub sub sub"><h3>sub sub sub<a class="anchor" href="#1.1.1:sub sub sub"></a></h3>
-</section></section><section class="h2 x" id="1.2:sub2 bar"><h2 class="x">sub2 bar<a class="anchor" href="#1.2:sub2 bar"></a></h2>
+'<section class="h2" id="0.1:foo"><h2>foo<a class="anchor" href="#0.1:foo" aria-label="#0.1:foo"></a></h2>
+</section><section class="h1" id="1:bar"><h1>bar<a class="anchor" href="#1:bar" aria-label="#1:bar"></a></h1>
+<section class="h2" id="1.1:sub bar"><h2>sub bar<a class="anchor" href="#1.1:sub bar" aria-label="#1.1:sub bar"></a></h2>
+<section class="h3" id="1.1.1:sub sub sub"><h3>sub sub sub<a class="anchor" href="#1.1.1:sub sub sub" aria-label="#1.1.1:sub sub sub"></a></h3>
+</section></section><section class="h2 x" id="1.2:sub2 bar"><h2 class="x">sub2 bar<a class="anchor" href="#1.2:sub2 bar" aria-label="#1.2:sub2 bar"></a></h2>
</section></section>' \
'Headline Nesting'
Tests
-----
[Link with Title](https://en.wikipedia.org/wiki/Markdown "Markdown in Wikipedia"), *emphasis*, **strong**, **strong containing *emphasis***, `inline code`, `` code with `backticks` ``. See more tests [here](./tests/).' \
-'<section class="h1" id="1:Markdown.awk"><h1>Markdown.awk<a class="anchor" href="#1:Markdown.awk"></a></h1>
-<section class="h2" id="1.1:Supported Features / TODO:"><h2>Supported Features / TODO:<a class="anchor" href="#1.1:Supported Features / TODO:"></a></h2>
+'<section class="h1" id="1:Markdown.awk"><h1>Markdown.awk<a class="anchor" href="#1:Markdown.awk" aria-label="#1:Markdown.awk"></a></h1>
+<section class="h2" id="1.1:Supported Features / TODO:"><h2>Supported Features / TODO:<a class="anchor" href="#1.1:Supported Features / TODO:" aria-label="#1.1:Supported Features / TODO:"></a></h2>
<ul>
<li class="task done"><input type=checkbox disabled checked> done</li>
<li class="task pending"><input type=checkbox disabled> todo</li>
<li>? unsure (whether to implement)</li>
<li class="task partial"><input type=checkbox disabled> partial</li>
</ul>
-<section class="h3" id="1.1.1:Basic Markdown - Block elements:"><h3>Basic Markdown - Block elements:<a class="anchor" href="#1.1.1:Basic Markdown - Block elements:"></a></h3>
+<section class="h3" id="1.1.1:Basic Markdown - Block elements:"><h3>Basic Markdown - Block elements:<a class="anchor" href="#1.1.1:Basic Markdown - Block elements:" aria-label="#1.1.1:Basic Markdown - Block elements:"></a></h3>
<ul>
<li class="task done"><input type=checkbox disabled checked><p> Paragraphs</p>
<ul>
<li class="task done"><input type=checkbox disabled checked> Horizontal rules</li>
<li class="task done"><input type=checkbox disabled checked> Verbatim HTML block (disabled by default)</li>
</ul>
-</section><section class="h3" id="1.1.2:Basic Markdown - Inline elements:"><h3>Basic Markdown - Inline elements:<a class="anchor" href="#1.1.2:Basic Markdown - Inline elements:"></a></h3>
+</section><section class="h3" id="1.1.2:Basic Markdown - Inline elements:"><h3>Basic Markdown - Inline elements:<a class="anchor" href="#1.1.2:Basic Markdown - Inline elements:" aria-label="#1.1.2:Basic Markdown - Inline elements:"></a></h3>
<ul>
<li class="task done"><input type=checkbox disabled checked> Links</li>
<li class="task done"><input type=checkbox disabled checked> Reference style links</li>
</ul>
<p>NOTE: Set the environment variable <code>MD_HTML=true</code> to enable verbatim HTML</p>
-</section><section class="h3" id="1.1.3:Extensions - Block elements:"><h3>Extensions - Block elements:<a class="anchor" href="#1.1.3:Extensions - Block elements:"></a></h3>
+</section><section class="h3" id="1.1.3:Extensions - Block elements:"><h3>Extensions - Block elements:<a class="anchor" href="#1.1.3:Extensions - Block elements:" aria-label="#1.1.3:Extensions - Block elements:"></a></h3>
<ul>
<li class="task done"><input type=checkbox disabled checked> Automatic <section>-wrapping (custom)</li>
<li><p> ? Heading identifiers (php md, pandoc)</p>
<li class="task done"><input type=checkbox disabled checked> Metadata blocks (custom)</li>
<li class="task done"><input type=checkbox disabled checked> Fenced Divs (pandoc)</li>
</ul>
-</section><section class="h3" id="1.1.4:Extensions - Inline elements:"><h3>Extensions - Inline elements:<a class="anchor" href="#1.1.4:Extensions - Inline elements:"></a></h3>
+</section><section class="h3" id="1.1.4:Extensions - Inline elements:"><h3>Extensions - Inline elements:<a class="anchor" href="#1.1.4:Extensions - Inline elements:" aria-label="#1.1.4:Extensions - Inline elements:"></a></h3>
<ul>
<li class="task done"><input type=checkbox disabled checked> Ignore embedded_underscores (php md, pandoc)</li>
<li class="task done"><input type=checkbox disabled checked> <del>strikeout</del> (pandoc)</li>
<li class="task pending"><input type=checkbox disabled> Automatic em-dash / en-dash</li>
<li class="task done"><input type=checkbox disabled checked> Automatic → Arrows ← (custom)</li>
</ul>
-</section></section><section class="h2" id="1.2:Compatibility"><h2>Compatibility<a class="anchor" href="#1.2:Compatibility"></a></h2>
+</section></section><section class="h2" id="1.2:Compatibility"><h2>Compatibility<a class="anchor" href="#1.2:Compatibility" aria-label="#1.2:Compatibility"></a></h2>
<p>Markdown.awk can run in GNU awk (<code>gawk</code>) and in Busybox awk. It is <em>not</em> fully POSIX compliant and does not run in <code>mawk</code> or <code>nawk</code>. In particular it makes heavy use of the <code>gensub()</code> function and its ability to use paranthesized subexpressions in the replacement text. This feature is not available in the POSIX specified <code>sub()</code> and <code>gsub()</code> functions. Hence it cannot be replaced without effort.</p>
-</section><section class="h2" id="1.3:Tests"><h2>Tests<a class="anchor" href="#1.3:Tests"></a></h2>
+</section><section class="h2" id="1.3:Tests"><h2>Tests<a class="anchor" href="#1.3:Tests" aria-label="#1.3:Tests"></a></h2>
<p><a href="https://en.wikipedia.org/wiki/Markdown" title="Markdown in Wikipedia">Link with Title</a>, <em>emphasis</em>, <strong>strong</strong>, <strong>strong containing <em>emphasis</em></strong>, <code>inline code</code>, <code>code with `backticks`</code>. See more tests <a href="./tests/">here</a>.</p>
</section></section>' \
'Full Page (cgilite markdown)'
1. first list item
2. second list item' \
-'<section class="h1" id="1:Headline First Order"><h1>Headline First Order<a class="anchor" href="#1:Headline First Order"></a></h1>
-<section class="h2" id="1.1:Headline Second Order"><h2>Headline Second Order<a class="anchor" href="#1.1:Headline Second Order"></a></h2>
+'<section class="h1" id="1:Headline First Order"><h1>Headline First Order<a class="anchor" href="#1:Headline First Order" aria-label="#1:Headline First Order"></a></h1>
+<section class="h2" id="1.1:Headline Second Order"><h2>Headline Second Order<a class="anchor" href="#1.1:Headline Second Order" aria-label="#1.1:Headline Second Order"></a></h2>
<pre><code>Code Block
with indentation</code></pre>
-<blockquote><section class="h2" id="1/0.1:Blockquote"><h2>Blockquote<a class="anchor" href="#1/0.1:Blockquote"></a></h2>
+<blockquote><section class="h2" id="1/0.1:Blockquote"><h2>Blockquote<a class="anchor" href="#1/0.1:Blockquote" aria-label="#1/0.1:Blockquote"></a></h2>
<p>like in an email</p>
</section></blockquote>
-<section class="h3" id="1.1.1:Headline 3rd order"><h3>Headline 3rd order<a class="anchor" href="#1.1.1:Headline 3rd order"></a></h3>
+<section class="h3" id="1.1.1:Headline 3rd order"><h3>Headline 3rd order<a class="anchor" href="#1.1.1:Headline 3rd order" aria-label="#1.1.1:Headline 3rd order"></a></h3>
<ul>
<li>unordered List</li>
</ul>
- [Macros](dev-macros/)
- [Handlers](dev-handlers/)
- [Parsers](dev-parsers/)' \
-'<section class="h1" id="1:Shellwiki"><h1>Shellwiki<a class="anchor" href="#1:Shellwiki"></a></h1>
+'<section class="h1" id="1:Shellwiki"><h1>Shellwiki<a class="anchor" href="#1:Shellwiki" aria-label="#1:Shellwiki"></a></h1>
<p>Shellwiki is a Wiki and Content Management System with minimal dependencies. It can run on embedded devices, as well as full size web servers. Its goals are:</p>
<ul>
<li><p><strong>easy deployment</strong></p>
be written and modified by system administrators. </p>
</li>
</ul>
-<code class="macro">toc 2 2</code><section class="h2" id="1.1:Features"><h2>Features<a class="anchor" href="#1.1:Features"></a></h2>
+<code class="macro">toc 2 2</code><section class="h2" id="1.1:Features"><h2>Features<a class="anchor" href="#1.1:Features" aria-label="#1.1:Features"></a></h2>
<ul>
<li><p><strong>Markdown Wiki Syntax</strong></p>
</ul>
</li>
</ul>
-</section><section class="h2" id="1.2:Dependencies"><h2>Dependencies<a class="anchor" href="#1.2:Dependencies"></a></h2>
+</section><section class="h2" id="1.2:Dependencies"><h2>Dependencies<a class="anchor" href="#1.2:Dependencies" aria-label="#1.2:Dependencies"></a></h2>
<p>Shellwiki is based on <a href="/software/cgilite/">cgilite</a>, which is included in the installation. It is written in posix compliant shell script, and the markdown renderer is written in <del>posix compliant</del> AWK. The entire wiki system can run with nothing more than a busybox. In fact it can be served from the rescue shell in a Debian initrd, or from an OpenWRT router.</p>
<p><strong>Its precise requirements are:</strong></p>
<li><p><em>Optional:</em> Sendmail for sending password reminders, etc.</p>
</li>
</ul>
-</section><section class="h2" id="1.3:Installation"><h2>Installation<a class="anchor" href="#1.3:Installation"></a></h2>
+</section><section class="h2" id="1.3:Installation"><h2>Installation<a class="anchor" href="#1.3:Installation" aria-label="#1.3:Installation"></a></h2>
<p>Also see → <a href="installation/">installation/</a></p>
<p>You can try out shellwiki right now using busybox:</p>
~$ _DATA=~/wikidata busybox nc -llp 1080 -e ~/shellwiki/index.cgi</code></pre>
<p>For additional examples, regarding permanent installation and configuration in webservers see <a href="installation/">installation/</a>.</p>
-</section><section class="h2" id="1.4:Syntax"><h2>Syntax<a class="anchor" href="#1.4:Syntax"></a></h2>
+</section><section class="h2" id="1.4:Syntax"><h2>Syntax<a class="anchor" href="#1.4:Syntax" aria-label="#1.4:Syntax"></a></h2>
<p>The wiki syntax is based on John Grubers <a href="https://daringfireball.net/projects/markdown/">Markdown</a> with extensions borrowed from <a href="https://pandoc.org/MANUAL 2.html#pandocs-markdown">Pandoc</a> and <a href="https://michelf.ca/projects/php-markdown/extra/">PHP Markdown Extra</a>. The Markdown parser is provided by <a href="/software/cgilite/">Cgilite</a> and its full documentation can be looked at <a href="/software/cgilite/markdown/">here</a>.</p>
-<code class="macro">include --nolink /[wiki]/editorhelp/</code></section><section class="h2" id="1.5:Macros"><h2>Macros<a class="anchor" href="#1.5:Macros"></a></h2>
+<code class="macro">include --nolink /[wiki]/editorhelp/</code></section><section class="h2" id="1.5:Macros"><h2>Macros<a class="anchor" href="#1.5:Macros" aria-label="#1.5:Macros"></a></h2>
<p>Also see → <a href="macros/">macros/</a></p>
<p>In addition to the Markdown syntax, wiki pages can include Macros, which perform additional functions on a page, like generating an image gallery, including parts of other pages, etc. Macros make Shellwiki truly dynamic and flexible.</p>
<p>Macros are the most easy to write type of extension. See <a href="macros/">Macros</a> for a full list of available macros.</p>
-</section><section class="h2" id="1.6:Themes"><h2>Themes<a class="anchor" href="#1.6:Themes"></a></h2>
+</section><section class="h2" id="1.6:Themes"><h2>Themes<a class="anchor" href="#1.6:Themes" aria-label="#1.6:Themes"></a></h2>
<p>Also see → <a href="theming/">theming/</a></p>
<p>While Shellwiki supports plugins for <a href="dev-theming/">theming</a>, it's apearance can mostly be configured by the user. Pages can be configured to use custom CSS files. In addition page headers and footers are themselves wiki pages which can be modified to add menus, custom logos, links, etc. The same goes for error pages.</p>
<p>For an example, see the <a href="/[wiki]/">technical pages</a> for this wiki.</p>
-</section><section class="h2" id="1.7:Multiple Languages"><h2>Multiple Languages<a class="anchor" href="#1.7:Multiple Languages"></a></h2>
+</section><section class="h2" id="1.7:Multiple Languages"><h2>Multiple Languages<a class="anchor" href="#1.7:Multiple Languages" aria-label="#1.7:Multiple Languages"></a></h2>
<p>To enable a multilingual setup you must set a default language in your configuration environment:</p>
<pre><code>export LANGUAGE_DEFAULT=en</code></pre>
<p>Header, footer, and error pages will be included from their respective language version, as will all macro includes, etc. Should a page not exist in a given language, the default page will be displayed instead. However, included elements will still be taken from the respective language version, possibly mixing languages between the selected user language and the default.</p>
-<section class="h3" id="1.7.1:Constraints of the current implementation"><h3>Constraints of the current implementation<a class="anchor" href="#1.7.1:Constraints of the current implementation"></a></h3>
+<section class="h3" id="1.7.1:Constraints of the current implementation"><h3>Constraints of the current implementation<a class="anchor" href="#1.7.1:Constraints of the current implementation" aria-label="#1.7.1:Constraints of the current implementation"></a></h3>
<ul>
<li>There can be only one default language, with no priority of different fallback languages</li>
<li>Page URLs can currently not be translated. Doing so would require a model for manually assigning translated page names and would not be trivial to use.</li>
</ul>
-</section></section><section class="h2" id="1.8:Developer Documentation"><h2>Developer Documentation<a class="anchor" href="#1.8:Developer Documentation"></a></h2>
+</section></section><section class="h2" id="1.8:Developer Documentation"><h2>Developer Documentation<a class="anchor" href="#1.8:Developer Documentation" aria-label="#1.8:Developer Documentation"></a></h2>
<p>How to write:</p>
<ul>
<li><a href="dev-theming/">Themes</a></li>