pandoc/test/command/5986.md
John MacFarlane 0a502e5ff5 HTML reader: retain attribute prefixes and avoid duplicates.
Previously we stripped attribute prefixes, reading
`xml:lang` as `lang` for example. This resulted in
two duplicate `lang` attributes when `xml:lang` and
`lang` were both used.  This commit causes the prefixes
to be retained, and also avoids invald duplicate
attributes.

Closes #6938.
2020-12-10 15:44:10 -08:00

17 lines
559 B
Markdown

```
% pandoc -t epub --number-sections --toc --metadata title=Foo -o - | pandoc -f epub -t html
# Hi
^D
<p><span id="title_page.xhtml"></span></p>
<p><span id="nav.xhtml"></span></p>
<nav epub:type="landmarks" id="landmarks" hidden="hidden">
<ol>
<li><a href="text/title_page.xhtml">Title Page</a></li>
<li><a href="#nav.xhtml#toc">Table of Contents</a></li>
</ol>
</nav>
<p><span id="ch001.xhtml"></span></p>
<section id="ch001.xhtml#hi" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> Hi</h1>
</section>
```