diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-06-11 10:36:34 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-06-11 10:36:34 -0700 |
commit | 550d949b9eb5ee82d6c77ec40374de3602ba54aa (patch) | |
tree | 8cbf60febf8cf50e7ca79b06c6b1aadfc710c24c /test | |
parent | 3febd81cbcadf7d36fd4686a5d323b31c44adf3a (diff) | |
download | pandoc-550d949b9eb5ee82d6c77ec40374de3602ba54aa.tar.gz |
JATS writer: wrap elements with p when needed.
The JATS spec restricts contents of certain
elements (fn, list-item); this patch wraps
elements that can't go in these contexts inside
p elements with specific-use "wrapper", so the
documents will conform.
Closes #5570.
Diffstat (limited to 'test')
-rw-r--r-- | test/writer.jats | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/test/writer.jats b/test/writer.jats index 99cb3230b..8ca27083a 100644 --- a/test/writer.jats +++ b/test/writer.jats @@ -498,10 +498,14 @@ These should not be escaped: \$ \\ \> \[ \{</preformat> <term><italic>orange</italic></term> <def> <p>orange fruit</p> - <preformat>{ orange code block }</preformat> - <disp-quote> - <p>orange block quote</p> - </disp-quote> + <p specific-use="wrapper"> + <preformat>{ orange code block }</preformat> + </p> + <p specific-use="wrapper"> + <disp-quote> + <p>orange block quote</p> + </disp-quote> + </p> </def> </def-item> </def-list> @@ -552,14 +556,16 @@ These should not be escaped: \$ \\ \> \[ \{</preformat> <term>orange</term> <def> <p>orange fruit</p> - <list list-type="order"> - <list-item> - <p>sublist</p> - </list-item> - <list-item> - <p>sublist</p> - </list-item> - </list> + <p specific-use="wrapper"> + <list list-type="order"> + <list-item> + <p>sublist</p> + </list-item> + <list-item> + <p>sublist</p> + </list-item> + </list> + </p> </def> </def-item> </def-list> @@ -870,7 +876,9 @@ These should not be escaped: \$ \\ \> \[ \{</preformat> <p>Here’s the long note. This one contains multiple blocks.</p> <p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p> - <preformat> { <code> }</preformat> + <p specific-use="wrapper"> + <preformat> { <code> }</preformat> + </p> <p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.</p> </fn> |