From cfc1d6a7b9e75b4a8dcc628f04fa7a73e3c3fbe7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 18 Jul 2023 17:09:45 -0700 Subject: JATS writer: don't use `` for inline code. See #8889. The Taylor and Francis guide to JATS says that `` is block level and not intended to be used inline within standard text. --- src/Text/Pandoc/Writers/JATS.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/JATS.hs b/src/Text/Pandoc/Writers/JATS.hs index bb770009c..ad18d6cf7 100644 --- a/src/Text/Pandoc/Writers/JATS.hs +++ b/src/Text/Pandoc/Writers/JATS.hs @@ -419,9 +419,8 @@ inlineToJATS opts (Quoted DoubleQuote lst) = do contents <- inlinesToJATS opts lst return $ char '“' <> contents <> char '”' inlineToJATS opts (Code a str) = - return $ inTags False tag attr $ literal (escapeStringForXML str) - where (lang, attr) = codeAttr opts a - tag = if T.null lang then "monospace" else "code" + return $ inTags False "monospace" attr $ literal (escapeStringForXML str) + where (_lang, attr) = codeAttr opts a inlineToJATS _ il@(RawInline f x) | f == "jats" = return $ literal x | otherwise = do -- cgit v1.2.3