aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Man.hs15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs
index a0d8447f0..ce8dc574f 100644
--- a/src/Text/Pandoc/Writers/Man.hs
+++ b/src/Text/Pandoc/Writers/Man.hs
@@ -80,9 +80,9 @@ metaToMan options (Meta title authors date) = do
let head = (text ".TH") <+> title' <+> section <+>
doubleQuotes (text date) <+> hsep extras
let foot = case length authors of
- 0 -> text $ ""
- 1 -> text $ ".SH AUTHOR\n" ++ joinWithSep ", " authors
- 2 -> text $ ".SH AUTHORS\n" ++ joinWithSep ", " authors
+ 0 -> empty
+ 1 -> text ".SH AUTHOR" $$ (text $ joinWithSep ", " authors)
+ 2 -> text ".SH AUTHORS" $$ (text $ joinWithSep ", " authors)
return $ if writerStandalone options
then (head, foot)
else (empty, empty)
@@ -261,9 +261,12 @@ inlineToMan opts (Strong lst) = do
inlineToMan opts (Strikeout lst) = do
contents <- inlineListToMan opts lst
return $ text "[STRIKEOUT:" <> contents <> char ']'
--- just treat superscripts and subscripts like normal text
-inlineToMan opts (Superscript lst) = inlineListToMan opts lst
-inlineToMan opts (Subscript lst) = inlineListToMan opts lst
+inlineToMan opts (Superscript lst) = do
+ contents <- inlineListToMan opts lst
+ return $ char '^' <> contents <> char '^'
+inlineToMan opts (Subscript lst) = do
+ contents <- inlineListToMan opts lst
+ return $ char '~' <> contents <> char '~'
inlineToMan opts (Quoted SingleQuote lst) = do
contents <- inlineListToMan opts lst
return $ char '`' <> contents <> char '\''