mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-29 01:41:20 +08:00
0640c4c985
This change ensures that raw content marked `epub2` will appear in (only) EPUBv2 output and content marked `epub3` will appear in (only) EPUBv3 output.
43 lines
1.0 KiB
Markdown
43 lines
1.0 KiB
Markdown
Raw EPUB attributes are rendered in EPUB output.
|
|
|
|
```
|
|
% pandoc -f native -t epub --metadata title=Raw -o - | pandoc -f epub -t html
|
|
[ RawBlock (Format "epub") "<p>ok</p>" ]
|
|
^D
|
|
<p><span id="title_page.xhtml"></span></p>
|
|
<p><span id="ch001.xhtml"></span></p>
|
|
<section id="ch001.xhtml_raw" class="unnumbered level1">
|
|
<h1 class="unnumbered">Raw</h1>
|
|
<p>ok</p>
|
|
</section>
|
|
```
|
|
|
|
Raw EPUB2 attributes are omitted from EPUB3 output.
|
|
|
|
```
|
|
% pandoc -f markdown -t epub3 --metadata title=Raw -o - | pandoc -f epub -t html
|
|
~~~ {=epub2}
|
|
<p>ok</p>
|
|
~~~
|
|
^D
|
|
<p><span id="title_page.xhtml"></span></p>
|
|
<p><span id="ch001.xhtml"></span></p>
|
|
<section id="ch001.xhtml_raw" class="unnumbered level1">
|
|
<h1 class="unnumbered">Raw</h1>
|
|
</section>
|
|
```
|
|
|
|
```
|
|
% pandoc -f markdown -t epub3 --metadata title=Raw -o - | pandoc -f epub -t html
|
|
~~~ {=epub3}
|
|
<p>ok</p>
|
|
~~~
|
|
^D
|
|
<p><span id="title_page.xhtml"></span></p>
|
|
<p><span id="ch001.xhtml"></span></p>
|
|
<section id="ch001.xhtml_raw" class="unnumbered level1">
|
|
<h1 class="unnumbered">Raw</h1>
|
|
<p>ok</p>
|
|
</section>
|
|
```
|