diff options
-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 |