JATS writer: remove 'role' attribute on 'bold' and 'sc' elements.

The JATS spec does not allow these.

Closes #4937.
This commit is contained in:
John MacFarlane 2018-09-27 13:18:06 -07:00
parent 99aae5d7cd
commit 53657798cd
2 changed files with 8 additions and 10 deletions

View file

@ -344,7 +344,7 @@ inlineToJATS _ (Str str) = return $ text $ escapeStringForXML str
inlineToJATS opts (Emph lst) =
inTagsSimple "italic" <$> inlinesToJATS opts lst
inlineToJATS opts (Strong lst) =
inTags False "bold" [("role", "strong")] <$> inlinesToJATS opts lst
inTagsSimple "bold" <$> inlinesToJATS opts lst
inlineToJATS opts (Strikeout lst) =
inTagsSimple "strike" <$> inlinesToJATS opts lst
inlineToJATS opts (Superscript lst) =
@ -352,8 +352,7 @@ inlineToJATS opts (Superscript lst) =
inlineToJATS opts (Subscript lst) =
inTagsSimple "sub" <$> inlinesToJATS opts lst
inlineToJATS opts (SmallCaps lst) =
inTags False "sc" [("role", "smallcaps")] <$>
inlinesToJATS opts lst
inTagsSimple "sc" <$> inlinesToJATS opts lst
inlineToJATS opts (Quoted SingleQuote lst) = do
contents <- inlinesToJATS opts lst
return $ char '' <> contents <> char ''

View file

@ -583,7 +583,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
</boxed-text>
<p>Interpreted markdown in a table:</p>
<p>This is <italic>emphasized</italic></p>
<p>And this is <bold role="strong">strong</bold></p>
<p>And this is <bold>strong</bold></p>
<p>Heres a simple block:</p>
<boxed-text>
<p>foo</p>
@ -614,14 +614,13 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<sec id="inline-markup">
<title>Inline Markup</title>
<p>This is <italic>emphasized</italic>, and so <italic>is this</italic>.</p>
<p>This is <bold role="strong">strong</bold>, and so <bold role="strong">is
this</bold>.</p>
<p>This is <bold>strong</bold>, and so <bold>is this</bold>.</p>
<p>An <italic><ext-link ext-link-type="uri" xlink:href="/url">emphasized
link</ext-link></italic>.</p>
<p><bold role="strong"><italic>This is strong and em.</italic></bold></p>
<p>So is <bold role="strong"><italic>this</italic></bold> word.</p>
<p><bold role="strong"><italic>This is strong and em.</italic></bold></p>
<p>So is <bold role="strong"><italic>this</italic></bold> word.</p>
<p><bold><italic>This is strong and em.</italic></bold></p>
<p>So is <bold><italic>this</italic></bold> word.</p>
<p><bold><italic>This is strong and em.</italic></bold></p>
<p>So is <bold><italic>this</italic></bold> word.</p>
<p>This is code: <monospace>&gt;</monospace>, <monospace>$</monospace>,
<monospace>\</monospace>, <monospace>\$</monospace>,
<monospace>&lt;html&gt;</monospace>.</p>