@@ -305,6 +305,10 @@ preprocessInlineList (Cite _ lst:xs) = (lst ++) <$> preprocessInlineList xs
305305preprocessInlineList (x:xs) = (x:) <$> preprocessInlineList xs
306306preprocessInlineList [] = return []
307307
308+replaceSmallCaps :: Inline -> Inline
309+replaceSmallCaps (SmallCaps lst) = Emph lst
310+replaceSmallCaps x = x
311+
308312normalizeInlineList :: [Inline] -> [Inline]
309313normalizeInlineList (Str "" : xs)
310314 = normalizeInlineList xs
@@ -344,7 +348,7 @@ inlineListToMuse :: PandocMonad m
344348 => [Inline]
345349 -> StateT WriterState m Doc
346350inlineListToMuse lst = do
347− lst' <- normalizeInlineList <$> preprocessInlineList lst
351+ lst' <- normalizeInlineList <$> preprocessInlineList (map replaceSmallCaps lst)
348352 if null lst'
349353 then pure "<verbatim></verbatim>"
350354 else hcat <$> mapM inlineToMuse (fixNotes lst')
@@ -369,7 +373,8 @@ inlineToMuse (Superscript lst) = do
369373inlineToMuse (Subscript lst) = do
370374 contents <- inlineListToMuse lst
371375 return $ "<sub>" <> contents <> "</sub>"
372−inlineToMuse (SmallCaps lst) = inlineToMuse (Emph lst)
376+inlineToMuse (SmallCaps {}) =
377+ fail "SmallCaps should be expanded before normalization"
373378inlineToMuse (Quoted SingleQuote lst) = do
374379 contents <- inlineListToMuse lst
375380 return $ "‘" <> contents <> "’"