JATS writer: don't use break element for LineBreak.

It's only allowed in a few special contexts, and not in
p elements.
This commit is contained in:
John MacFarlane 2019-06-11 16:19:12 -07:00
parent bb68c183b3
commit f7c0d2fb3f
2 changed files with 4 additions and 2 deletions

View file

@ -390,7 +390,8 @@ inlineToJATS _ il@(RawInline f x)
| otherwise = do
report $ InlineNotRendered il
return empty
inlineToJATS _ LineBreak = return $ selfClosingTag "break" []
inlineToJATS _ LineBreak = return cr -- not allowed as child of p
-- see https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/break.html
inlineToJATS _ Space = return space
inlineToJATS opts SoftBreak
| writerWrapText opts == WrapPreserve = return cr

View file

@ -68,7 +68,8 @@ Grubers markdown test suite.</p>
item. Because a hard-wrapped line in the middle of a paragraph looked like a
list item.</p>
<p>Heres one with a bullet. * criminey.</p>
<p>There should be a hard line break<break />here.</p>
<p>There should be a hard line break
here.</p>
</sec>
<sec id="block-quotes">
<title>Block Quotes</title>