aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index 6ecd826fa..128e2c6f9 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -441,6 +441,8 @@ inlineToMuse (Span (anchor,names,_) inlines) = do
let anchorDoc = if null anchor
then mempty
else text ('#':anchor) <> space
- return $ anchorDoc <> if null names
- then contents
- else "<class name=\"" <> text (head names) <> "\">" <> contents <> "</class>"
+ return $ anchorDoc <> (if null inlines && not (null anchor)
+ then mempty
+ else (if null names
+ then "<class>"
+ else "<class name=\"" <> text (head names) <> "\">") <> contents <> "</class>")