diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/JATS.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/JATS.hs b/src/Text/Pandoc/Writers/JATS.hs index ac438a9ff..6cbe35bdc 100644 --- a/src/Text/Pandoc/Writers/JATS.hs +++ b/src/Text/Pandoc/Writers/JATS.hs @@ -319,7 +319,15 @@ tableItemToJATS opts isHeader item = -- | Convert a list of inline elements to JATS. inlinesToJATS :: PandocMonad m => WriterOptions -> [Inline] -> JATS m Doc -inlinesToJATS opts lst = hcat <$> mapM (inlineToJATS opts) lst +inlinesToJATS opts lst = hcat <$> mapM (inlineToJATS opts) (fixCitations lst) + where + fixCitations [] = [] + fixCitations (x@(RawInline (Format "jats") "<pub-id pub-id-type=\"doi\">") : xs) = + let isRawInline (RawInline{}) = True + isRawInline _ = False + (ys,zs) = break isRawInline xs + in x : Str (stringify ys) : fixCitations zs + fixCitations (x:xs) = x : fixCitations xs -- | Convert an inline element to JATS. inlineToJATS :: PandocMonad m => WriterOptions -> Inline -> JATS m Doc |