Improve handling of elements containing raw text
While adding another test case from the goorgeous issues it became clear that inline markup and html entity replacement were erronously applied to raw text elements like inline code =foo=, src/example/export blocks, example lines, etc. To correctly handle those cases in both org and html exports a new parseRawInline method had to be added. Also some misc html export whitespace fixes and stuff
This commit is contained in:
parent
ac2597af4c
commit
0eb3baf1bb
10 changed files with 191 additions and 45 deletions
91
org/testdata/misc.html
vendored
91
org/testdata/misc.html
vendored
|
@ -57,7 +57,6 @@ Still outside the drawer
|
|||
This is inside the drawer
|
||||
:END:
|
||||
Still outside the drawer
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -79,7 +78,6 @@ lines.
|
|||
<p>
|
||||
Paragraphs can contain inline markup like <em>emphasis</em> <strong>strong</strong> and links <a href="https://www.example.com">example.com</a> and stuff.
|
||||
</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
|
@ -87,7 +85,7 @@ example block
|
|||
</p>
|
||||
<pre class="example">
|
||||
language: go
|
||||
go: "1.x"
|
||||
go: "1.x"
|
||||
script:
|
||||
- make test
|
||||
- make generate-gh-pages
|
||||
|
@ -100,7 +98,6 @@ deploy:
|
|||
verbose: true
|
||||
on:
|
||||
branch: master
|
||||
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -270,3 +267,89 @@ Bar
|
|||
<p>
|
||||
Bar paragraph
|
||||
</p>
|
||||
<h3>
|
||||
<span class="todo">DONE</span>
|
||||
<a href="https://github.com/chaseadamsio/goorgeous/issues/86">#86</a>: Multiple hyphens not converted to dashes
|
||||
</h3>
|
||||
<p>
|
||||
just like #46
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
<code class="verbatim">--</code> -> – (en dash)
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<code class="verbatim">---</code> -> — (em dash)
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
also, consecutive dashes inside
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
inline code <code class="verbatim">--</code> <code class="verbatim">---</code> and verbatim <code>--</code> <code>---</code>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
src/example/export blocks should not be converted!
|
||||
</p>
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
--, ---
|
||||
</pre>
|
||||
</div>
|
||||
<pre class="example">
|
||||
--, ---
|
||||
</pre>
|
||||
--, ---
|
||||
<pre class="example">
|
||||
--, ---
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<span class="todo">DONE</span>
|
||||
<a href="https://github.com/chaseadamsio/goorgeous/issues/87">#87</a>: Markup in footnotes is rendered literally
|
||||
</h3>
|
||||
<p>
|
||||
footnotes can contain <strong>markup</strong> - and other elements and stuff <sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup>
|
||||
</p>
|
||||
<div class="footnotes">
|
||||
<h1 class="footnotes-title">Footnotes</h1>
|
||||
<div class="footnote-definitions">
|
||||
<div class="footnote-definition">
|
||||
<sup id="footnote-1"><a href="#footnote-reference-1">1</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
a footnote <em>with</em> <strong>markup</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
and a <strong>list</strong>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
because that's possible
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footnote-definition">
|
||||
<sup id="footnote-2"><a href="#footnote-reference-2">2</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
that also goes for <strong>inline</strong> footnote <em>definitions</em>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue