=lv0?=            => =lv0?=

==lv1==            => <h1>\nlv1\n</h1>
=======lv6n======= => <h6>\nlv6n\n</h6>
========lv7?========  => ========lv7?========

setting headingMode extended
==lv1==           => <h1>\nlv1\n</h1>
==lv1==\n==lv2==\n===lv3===  => <h1>\nlv1\n</h1>\n<h2>\nlv2\n</h2>\n<h3>\nlv3\n</h3>
======lv6e======  => <h6>\nlv6e\n</h6>
=======lv7?=======  => =======lv7?=======

setting headingMode shifted
==lv2==           => <h2>\nlv2\n</h2>
======lv6s======  => <h6>\nlv6s\n</h6>
=======lv7?=======  => =======lv7?=======

setting headingMode -


Multiline tests

{{title "Should set shifted automatically"}}
==shifted==
  =>
<h2>
shifted
</h2>

{{ЗАГЛАВИЕ "Should set shifted automatically"}}
==shifted==
  =>
<h2>
shifted
</h2>

%%(title)
  Should set shifted automatically
%%
==shifted==
  =>
<h2>
shifted
</h2>

%%(title; php)
  echo 'str';
%%
==shifted==
{{title}}
  =>
<h2>
shifted
</h2>
<span class="doc-title">
<code class="format format-php"><span style="color: #000000"><span style="color: #0000BB">&nbsp;&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">'str'</span><span style="color: #007700">;</span></span></code>
</span>

{{titlezzz No!}}
==No!==
  =>
<em class="format-error">Markup or action Titlezzz doesn't exist.</em>
<h1>
No!
</h1>

%%(titlezzz)
  No!
%%
==No!==
  =>
<pre>  No!</pre>
<h1>
No!
</h1>

{{title}}
==not shifted==
  =>
<span class="doc-title">
not shifted
</span>
<h1>
not shifted
</h1>

{{title a}}
{{toc}}
==aa==
===abc==
==bb==
  =>
<fieldset class="toc">
<legend>
a
</legend>
<ol>
<li>
<span class="index">1.</span> <a href="#aa">aa</a><ol>
<li>
<span class="index">1.1.</span> <a href="#abc">abc</a>
</li>
</ol>
</li>
<li>
<span class="index">2.</span> <a href="#bb">bb</a>
</li>
</ol>
</fieldset>
<h2>
aa
</h2>
<h3>
abc
</h3>
<h2>
bb
</h2>
  ;; there was a bug that made {{TOC}} to omit section indexes for root headings when $headingMode wasn't 'normal'.