git.iko.soy/typeable/pandoc
on master help sign in
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

commite6f67fcc57872bf0e4574a0163f91f1ac259cd9f authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 1 Jul 2007, 23:23 (19 years ago) parenta669f64
1 file changed+5−5
src/Text/Pandoc/Writers/Man.hs+5−5
src/Text/Pandoc/Writers/Man.hs+5−5
@@ -69,8 +69,8 @@ metaToMan options (Meta title authors date) = do
6969 "\" \"") <> title' <> text ("\" \"User Manuals\"")
7070 let foot = case length authors of
7171 0 -> text $ ""
72− 1 -> text $ ".SH AUTHOR\n" ++ joinWithSep "\n" authors
73− 2 -> text $ ".SH AUTHORS\n" ++ joinWithSep "\n" authors
72+ 1 -> text $ ".SH AUTHOR\n" ++ joinWithSep ", " authors
73+ 2 -> text $ ".SH AUTHORS\n" ++ joinWithSep ", " authors
7474 return $ if writerStandalone options
7575 then (head, foot)
7676 else (empty, empty)
@@ -105,11 +105,11 @@ escapeNbsp str =
105105
106106-- | Escape special characters for Man.
107107escapeString :: String -> String
108−escapeString = escapeNbsp . backslashEscape "-\\"
108+escapeString = escapeNbsp . backslashEscape "\"-'.\\"
109109
110110-- | Escape a literal (code) section for Man.
111111escapeCode :: String -> String
112−escapeCode = backslashEscape "-\\\t "
112+escapeCode = backslashEscape "\t " . escapeString
113113
114114-- | Convert Pandoc block element to man.
115115blockToMan :: WriterOptions -- ^ Options
@@ -259,5 +259,5 @@ inlineToMan opts (Note contents) = do
259259 modify (\notes -> contents:notes) -- add to notes in state
260260 notes <- get
261261 let ref = show $ (length notes)
262− return $ text "[^" <> text ref <> char ']'
262+ return $ text "[" <> text ref <> char ']'
263263