diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Lua.hs | 2 | ||||
-rw-r--r-- | test/command/3523.md | 31 | ||||
-rw-r--r-- | test/command/5619.md | 10 | ||||
-rw-r--r-- | test/command/5627.md | 83 | ||||
-rw-r--r-- | test/command/5635.md | 23 | ||||
-rw-r--r-- | test/command/5642.md | 8 | ||||
-rw-r--r-- | test/writer.jats | 4 |
7 files changed, 158 insertions, 3 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs index 7a1261eb2..49d54c9c8 100644 --- a/test/Tests/Lua.hs +++ b/test/Tests/Lua.hs @@ -192,7 +192,7 @@ assertFilterConversion msg filterPath docIn expectedDoc = do roundtripEqual :: (Eq a, Lua.Peekable a, Lua.Pushable a) => a -> IO Bool roundtripEqual x = (x ==) <$> roundtripped where - roundtripped :: (Lua.Peekable a, Lua.Pushable a) => IO a + roundtripped :: Lua.Peekable a => IO a roundtripped = runLuaTest $ do oldSize <- Lua.gettop Lua.push x diff --git a/test/command/3523.md b/test/command/3523.md new file mode 100644 index 000000000..cb0089489 --- /dev/null +++ b/test/command/3523.md @@ -0,0 +1,31 @@ +``` +% pandoc -f latex -t html +\documentclass{article} +\usepackage{epigraph} +\begin{document} + +\epigraph{ + Das Recht hat kein Dasein f{\"u}r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen. + + Das Recht hat kein Dasein f{\"u}r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen. + + \begin{itemize} + \item hey + \item hey + \item hey + \end{itemize} + + }{ Friedrich Carl von Savigny } +\end{document} +^D +<div class="epigraph"> +<p>Das Recht hat kein Dasein f<span>ü</span>r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen.</p> +<p>Das Recht hat kein Dasein f<span>ü</span>r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen.</p> +<ul> +<li><p>hey</p></li> +<li><p>hey</p></li> +<li><p>hey</p></li> +</ul> +<p>Friedrich Carl von Savigny</p> +</div> +``` diff --git a/test/command/5619.md b/test/command/5619.md new file mode 100644 index 000000000..776d57acc --- /dev/null +++ b/test/command/5619.md @@ -0,0 +1,10 @@ +``` +% pandoc -f rst -t native +.. figure:: img1.jpg + :width: 1in + :name: test + + The caption. Here's what piggybacking on caption would look like {#fig:1} +^D +[Para [Image ("test",[],[("width","1in")]) [Str "The",Space,Str "caption.",Space,Str "Here's",Space,Str "what",Space,Str "piggybacking",Space,Str "on",Space,Str "caption",Space,Str "would",Space,Str "look",Space,Str "like",Space,Str "{#fig:1}"] ("img1.jpg","fig:")]] +``` diff --git a/test/command/5627.md b/test/command/5627.md new file mode 100644 index 000000000..0f67a083f --- /dev/null +++ b/test/command/5627.md @@ -0,0 +1,83 @@ +``` +% pandoc -t html +## Example + +1. One +2. Two `-->something<!--` +3. Three + +~~~html +--><!--<script>alert('Escaped!')</script> +~~~ + +~~~html +Something +~~~ +^D +<h2 id="example">Example</h2> +<ol type="1"> +<li>One</li> +<li>Two <code>-->something<!--</code></li> +<li>Three</li> +</ol> +<div class="sourceCode" id="cb1"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb1-1"><a href="#cb1-1"></a>--><span class="co"><!--<script>alert('Escaped!')</script></span></span></code></pre></div> +<div class="sourceCode" id="cb2"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1"></a>Something</span></code></pre></div> +``` + +``` +% pandoc -t html +## Example 2 + +- `-->something<!--` +- `-->something<!--` +- bye `-->something else<!--` + +~~~html +--><!--<script>alert('Escaped!')</script> +~~~ + +~~~html +Something +~~~ +^D +<h2 id="example-2">Example 2</h2> +<ul> +<li><code>-->something<!--</code></li> +<li><code>-->something<!--</code></li> +<li>bye <code>-->something else<!--</code></li> +</ul> +<div class="sourceCode" id="cb1"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb1-1"><a href="#cb1-1"></a>--><span class="co"><!--<script>alert('Escaped!')</script></span></span></code></pre></div> +<div class="sourceCode" id="cb2"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1"></a>Something</span></code></pre></div> +``` + +``` +% pandoc -t html +## Example 3 + +1. `-->one<!--` +5. bye `-->two <!--` +3. ` three, not in block +1. four, not in block ` +2. five +5. six +6. seven ` +- separate unordered list ` +42. forty-two, separate ordered list +^D +<h2 id="example-3">Example 3</h2> +<ol type="1"> +<li><code>-->one<!--</code></li> +<li>bye <code>-->two <!--</code></li> +<li>` three, not in block</li> +<li>four, not in block `</li> +<li>five</li> +<li>six</li> +<li>seven `</li> +</ol> +<ul> +<li>separate unordered list `</li> +</ul> +<ol start="42" type="1"> +<li>forty-two, separate ordered list</li> +</ol> +``` diff --git a/test/command/5635.md b/test/command/5635.md new file mode 100644 index 000000000..72440616f --- /dev/null +++ b/test/command/5635.md @@ -0,0 +1,23 @@ +``` +% pandoc -f latex -t plain +\providecommand{\test}{foo} +\providecommand{\test}{bar} + +The value is: \test +^D +The value is: foo +``` + +``` +% pandoc -f latex -t plain +\provideenvironment{test}{startfoo}{stopfoo} +\provideenvironment{test}{startbar}{stopbar} + +\begin{test} +Hi +\end{test} +^D +startfoo Hi stopfoo +``` + + diff --git a/test/command/5642.md b/test/command/5642.md new file mode 100644 index 000000000..7fe8f5a5f --- /dev/null +++ b/test/command/5642.md @@ -0,0 +1,8 @@ +``` +% pandoc -t html5 -f markdown +![test](foo){aria-describedby="barbaz"} +^D +<figure> +<img src="foo" aria-describedby="barbaz" alt="" /><figcaption>test</figcaption> +</figure> +``` diff --git a/test/writer.jats b/test/writer.jats index 7bbf8304d..8df981cc3 100644 --- a/test/writer.jats +++ b/test/writer.jats @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.0 20120330//EN" +<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "JATS-journalpublishing1.dtd"> -<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.0" article-type="other"> +<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.1" article-type="other"> <front> <journal-meta> <journal-title-group> |