git.iko.soy/typeable/pandoc
on master help sign in
JATS writer: don't use break element for LineBreak.
f7c0d2fJohn MacFarlane
src/Text/Pandoc/Writers/JATS.hs+2−1
@@ -390,7 +390,8 @@ inlineToJATS _ il@(RawInline f x)
390 | otherwise = do
390 | otherwise = do
391 report $ InlineNotRendered il
391 report $ InlineNotRendered il
392 return empty
392 return empty
393−inlineToJATS _ LineBreak = return $ selfClosingTag "break" []
393+inlineToJATS _ LineBreak = return cr -- not allowed as child of p
394+-- see https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/break.html
394inlineToJATS _ Space = return space
395inlineToJATS _ Space = return space
395inlineToJATS opts SoftBreak
396inlineToJATS opts SoftBreak
396 | writerWrapText opts == WrapPreserve = return cr
397 | writerWrapText opts == WrapPreserve = return cr
test/writer.jats+2−1
@@ -68,7 +68,8 @@ Gruber’s markdown test suite.</p>
68 item. Because a hard-wrapped line in the middle of a paragraph looked like a
68 item. Because a hard-wrapped line in the middle of a paragraph looked like a
69 list item.</p>
69 list item.</p>
70 <p>Here’s one with a bullet. * criminey.</p>
70 <p>Here’s one with a bullet. * criminey.</p>
71− <p>There should be a hard line break<break />here.</p>
71+ <p>There should be a hard line break
72+ here.</p>
72</sec>
73</sec>
73<sec id="block-quotes">
74<sec id="block-quotes">
74 <title>Block Quotes</title>
75 <title>Block Quotes</title>