From 550d949b9eb5ee82d6c77ec40374de3602ba54aa Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 11 Jun 2019 10:36:34 -0700 Subject: 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. --- test/writer.jats | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'test') 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: \$ \\ \> \[ \{ orange

orange fruit

- { orange code block } - -

orange block quote

-
+

+ { orange code block } +

+

+ +

orange block quote

+ +

@@ -552,14 +556,16 @@ These should not be escaped: \$ \\ \> \[ \{ orange

orange fruit

- - -

sublist

-
- -

sublist

-
-
+

+ + +

sublist

+ + +

sublist

+
+ +

@@ -870,7 +876,9 @@ These should not be escaped: \$ \\ \> \[ \{

Here’s the long note. This one contains multiple blocks.

Subsequent blocks are indented to show that they belong to the footnote (as with list items).

- { <code> } +

+ { <code> } +

If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.

-- cgit v1.2.3