aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-01 23:23:36 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-01 23:23:36 +0000
commite6f67fcc57872bf0e4574a0163f91f1ac259cd9f (patch)
tree2f8e50c0e92515c4bd06cbb4ecab48aea9ff5b8a /src/Text
parenta669f641b51e29254bce139cd2f045f4b9b1038c (diff)
downloadpandoc-e6f67fcc57872bf0e4574a0163f91f1ac259cd9f.tar.gz
Modified escaping in Man writer. Also changed
format of footnote references and authors list. git-svn-id: https://pandoc.googlecode.com/svn/trunk@608 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Man.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs
index f8cfe755a..f6514919c 100644
--- a/src/Text/Pandoc/Writers/Man.hs
+++ b/src/Text/Pandoc/Writers/Man.hs
@@ -69,8 +69,8 @@ metaToMan options (Meta title authors date) = do
"\" \"") <> title' <> text ("\" \"User Manuals\"")
let foot = case length authors of
0 -> text $ ""
- 1 -> text $ ".SH AUTHOR\n" ++ joinWithSep "\n" authors
- 2 -> text $ ".SH AUTHORS\n" ++ joinWithSep "\n" authors
+ 1 -> text $ ".SH AUTHOR\n" ++ joinWithSep ", " authors
+ 2 -> text $ ".SH AUTHORS\n" ++ joinWithSep ", " authors
return $ if writerStandalone options
then (head, foot)
else (empty, empty)
@@ -105,11 +105,11 @@ escapeNbsp str =
-- | Escape special characters for Man.
escapeString :: String -> String
-escapeString = escapeNbsp . backslashEscape "-\\"
+escapeString = escapeNbsp . backslashEscape "\"-'.\\"
-- | Escape a literal (code) section for Man.
escapeCode :: String -> String
-escapeCode = backslashEscape "-\\\t "
+escapeCode = backslashEscape "\t " . escapeString
-- | Convert Pandoc block element to man.
blockToMan :: WriterOptions -- ^ Options
@@ -259,5 +259,5 @@ inlineToMan opts (Note contents) = do
modify (\notes -> contents:notes) -- add to notes in state
notes <- get
let ref = show $ (length notes)
- return $ text "[^" <> text ref <> char ']'
+ return $ text "[" <> text ref <> char ']'