@@ -292,11 +292,16 @@ conditionalEscapeString s =
292292 then escapeString s
293293 else s
294294
295−-- Expand Math before normalizing inline list
295+-- Expand Math and Cite before normalizing inline list
296296preprocessInlineList :: PandocMonad m
297297 => [Inline]
298298 -> m [Inline]
299299preprocessInlineList (Math t str:xs) = (++) <$> texMathToInlines t str <*> preprocessInlineList xs
300+-- Amusewiki does not support <cite> tag,
301+-- and Emacs Muse citation support is limited
302+-- (https://www.gnu.org/software/emacs-muse/manual/html_node/Citations.html#Citation)
303+-- so just fallback to expanding inlines.
304+preprocessInlineList (Cite _ lst:xs) = (lst ++) <$> preprocessInlineList xs
300305preprocessInlineList (x:xs) = (x:) <$> preprocessInlineList xs
301306preprocessInlineList [] = return []
302307
@@ -371,11 +376,8 @@ inlineToMuse (Quoted SingleQuote lst) = do
371376inlineToMuse (Quoted DoubleQuote lst) = do
372377 contents <- inlineListToMuse lst
373378 return $ "“" <> contents <> "”"
374−-- Amusewiki does not support <cite> tag,
375−-- and Emacs Muse citation support is limited
376−-- (https://www.gnu.org/software/emacs-muse/manual/html_node/Citations.html#Citation)
377−-- so just fallback to expanding inlines.
378−inlineToMuse (Cite _ lst) = inlineListToMuse lst
379+inlineToMuse (Cite {}) =
380+ fail "Citations should be expanded before normalization"
379381inlineToMuse (Code _ str) = return $
380382 "<code>" <> text (substitute "</code>" "<</code><code>/code>" str) <> "</code>"
381383inlineToMuse Math{} =