aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Muse.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers/Muse.hs')
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index 88b4c2ef9..bf3265107 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -594,6 +594,13 @@ inlineToMuse (Strong [Emph lst]) = do
else if null lst' || startsWithSpace lst' || endsWithSpace lst'
then emphasis "**<em>" "</em>**" lst'
else emphasis "***" "***" lst'
+-- | Underline is only supported in Emacs Muse mode.
+inlineToMuse (Underline lst) = do
+ opts <- asks envOptions
+ contents <- inlineListToMuse lst
+ if isEnabled Ext_amuse opts
+ then return $ "_" <> contents <> "_"
+ else inlineToMuse (Emph lst)
inlineToMuse (Strong lst) = do
useTags <- gets stUseTags
let lst' = normalizeInlineList lst