diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-22 16:10:48 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-22 16:10:48 +0000 |
commit | 062cdfe7def550b29b77f8e712f3e8f32924e071 (patch) | |
tree | c69ca95c9ce07fdc5e7d9c567b01863f2d52d7f5 | |
parent | 2b3c2d43efc3552d3973d306fb3c2a57deadf166 (diff) | |
download | pandoc-062cdfe7def550b29b77f8e712f3e8f32924e071.tar.gz |
Changed text to char for one character strings
in RST, Man, and Docbook writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@757 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r-- | src/Text/Pandoc/Writers/Docbook.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Man.hs | 8 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/RST.hs | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs index 2bb29da6c..21cbbefa4 100644 --- a/src/Text/Pandoc/Writers/Docbook.hs +++ b/src/Text/Pandoc/Writers/Docbook.hs @@ -242,7 +242,7 @@ inlineToDocbook opts (Subscript lst) = inTagsSimple "subscript" (inlinesToDocbook opts lst) inlineToDocbook opts (Quoted _ lst) = inTagsSimple "quote" (inlinesToDocbook opts lst) -inlineToDocbook opts Apostrophe = text "'" +inlineToDocbook opts Apostrophe = char '\'' inlineToDocbook opts Ellipses = text "…" inlineToDocbook opts EmDash = text "—" inlineToDocbook opts EnDash = text "–" diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs index 67d37288e..5d517843f 100644 --- a/src/Text/Pandoc/Writers/Man.hs +++ b/src/Text/Pandoc/Writers/Man.hs @@ -99,7 +99,7 @@ notesToMan opts notes = noteToMan :: WriterOptions -> Int -> [Block] -> State WriterState Doc noteToMan opts num note = do contents <- blockListToMan opts note - let marker = text "\n.SS [" <> text (show num) <> text "]" + let marker = text "\n.SS [" <> text (show num) <> char ']' return $ marker $$ contents wrappedMan :: WriterOptions -> [Inline] -> State WriterState Doc @@ -168,7 +168,7 @@ blockToMan opts (Table caption alignments widths headers rows) = return $ makeRow cols) rows return $ text ".PP" $$ caption' $$ text ".TS" $$ text "tab(@);" $$ coldescriptions $$ - colheadings' $$ text "_" $$ vcat body $$ text ".TE" + colheadings' $$ char '_' $$ vcat body $$ text ".TE" blockToMan opts (BulletList items) = do contents <- mapM (bulletListItemToMan opts) items @@ -260,7 +260,7 @@ inlineToMan opts (Strong lst) = do return $ text "\\f[B]" <> contents <> text "\\f[]" inlineToMan opts (Strikeout lst) = do contents <- inlineListToMan opts lst - return $ text "[STRIKEOUT:" <> contents <> text "]" + 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 @@ -298,5 +298,5 @@ inlineToMan opts (Note contents) = do modify (\(notes, prep) -> (contents:notes, prep)) -- add to notes in state (notes, _) <- get let ref = show $ (length notes) - return $ text "[" <> text ref <> char ']' + return $ char '[' <> text ref <> char ']' diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index 479d40b00..3f226ee98 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -262,13 +262,13 @@ inlineListToRST opts lst = mapM (inlineToRST opts) lst >>= (return . hcat) inlineToRST :: WriterOptions -> Inline -> State WriterState Doc inlineToRST opts (Emph lst) = do contents <- inlineListToRST opts lst - return $ text "*" <> contents <> text "*" + return $ char '*' <> contents <> char '*' inlineToRST opts (Strong lst) = do contents <- inlineListToRST opts lst return $ text "**" <> contents <> text "**" inlineToRST opts (Strikeout lst) = do contents <- inlineListToRST opts lst - return $ text "[STRIKEOUT:" <> contents <> text "]" + return $ text "[STRIKEOUT:" <> contents <> char ']' inlineToRST opts (Superscript lst) = do contents <- inlineListToRST opts lst return $ text "\\ :sup:`" <> contents <> text "`\\ " @@ -289,7 +289,7 @@ inlineToRST opts (Code str) = return $ text $ "``" ++ str ++ "``" inlineToRST opts (Str str) = return $ text $ escapeString str inlineToRST opts (TeX str) = return $ text str inlineToRST opts (HtmlInline str) = return empty -inlineToRST opts (LineBreak) = return $ text " " -- RST doesn't have linebreaks +inlineToRST opts (LineBreak) = return $ char ' ' -- RST doesn't have linebreaks inlineToRST opts Space = return $ char ' ' inlineToRST opts (Link txt (src, tit)) = do let useReferenceLinks = writerReferenceLinks opts |