else:
class_ = 'm-dox'
- return '<a href="{}" class="{}">{}</a>'.format(url, class_, add_wbr(html.escape(element.text)))
+ return '<a href="{}" class="{}">{}</a>'.format(url, class_, add_wbr(parse_inline_desc(state, element).strip()))
def extract_id(element: ET.Element) -> str:
id = element.attrib['id']
My Project
</h1>
<section id="section"><h2><a href="#section">Page section</a></h2><blockquote><p>A blockquote.</p></blockquote><pre class="m-code">Preformatted text.
-</pre><p>Paragraph<br />with<br />explicit<br />line<br />breaks.</p><section id="subsection"><h3><a href="#subsection">Page subsection</a></h3><ul><li>Unordered</li><li>list</li><li>of<ul><li>nested</li><li>items</li></ul></li><li>and back</li></ul><section id="subsubsection"><h4><a href="#subsubsection">Sub-sub section</a></h4><ol><li>Ordered</li><li>list</li><li>of<ol><li>nested</li><li>items</li></ol></li><li>and back</li></ol><p><a name="an-anchor"></a> This is a <code>typewriter text</code>, <em>emphasis</em> and <strong>bold</strong>. <em>Emphasis with <code>typewriter</code> and <strong>bold</strong> nested.</em> <a href="http://google.com">http:/<wbr />/<wbr />google.com</a> and <a href="http://google.com">URL</a>. En-dash – and em-dash —. Reference to a <a href="index.html#subsection" class="m-dox">Page subsection</a>.</p></section></section></section>
+</pre><p>Paragraph<br />with<br />explicit<br />line<br />breaks.</p><section id="subsection"><h3><a href="#subsection">Page subsection</a></h3><ul><li>Unordered</li><li>list</li><li>of<ul><li>nested</li><li>items</li></ul></li><li>and back</li></ul><section id="subsubsection"><h4><a href="#subsubsection">Sub-sub section</a></h4><ol><li>Ordered</li><li>list</li><li>of<ol><li>nested</li><li>items</li></ol></li><li>and back</li></ol><p><a name="an-anchor"></a> This is a <code>typewriter text</code>, <em>emphasis</em> and <strong>bold</strong>. <em>Emphasis with <code>typewriter</code> and <strong>bold</strong> nested.</em> <a href="http://google.com">http:/<wbr />/<wbr />google.com</a> and <a href="http://google.com">URL</a>. En-dash – and em-dash —. Reference to a <a href="index.html#subsection" class="m-dox">Page subsection</a>. Named reference with special characters in title: <a href="warnings.html" class="m-dox">» Warnings «</a>. Reference with escaped characters in title: <a href="index.html#an-anchor" class="m-dox"><anchor></a>.</p></section></section></section>
</div>
</div>
</div>
This is a `typewriter text`, *emphasis* and **bold**. <em>Emphasis with
<tt>typewriter</tt> and <strong>bold</strong> nested.</em> http://google.com
and [URL](http://google.com). En-dash -- and em-dash ---. Reference to a
-@ref subsection.
+@ref subsection. Named reference with special characters in title:
+@ref warnings "» Warnings «". Reference with escaped characters in
+title: @ref an-anchor "<anchor>".
*/