aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-22 16:08:19 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-22 16:08:19 +0000
commit2b3c2d43efc3552d3973d306fb3c2a57deadf166 (patch)
tree3e7cb7eacfa896480b58ace336125a53c65f156e /src/Text/Pandoc/Writers
parent6bb6dd2bfd526fff9a469fddd9515aec268bfe15 (diff)
downloadpandoc-2b3c2d43efc3552d3973d306fb3c2a57deadf166.tar.gz
Markdown writer: Substituted char for text for single characters.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@756 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index b55885509..707f2b346 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -236,7 +236,7 @@ definitionListItemToMarkdown :: WriterOptions
definitionListItemToMarkdown opts (label, items) = do
labelText <- inlineListToMarkdown opts label
let tabStop = writerTabStop opts
- let leader = text ":"
+ let leader = char ':'
contents <- mapM (\item -> blockToMarkdown opts item >>=
(\txt -> return (leader $$ nest tabStop txt)))
items >>= (return . vcat)
@@ -275,7 +275,7 @@ inlineListToMarkdown opts lst = mapM (inlineToMarkdown opts) lst >>= (return . h
inlineToMarkdown :: WriterOptions -> Inline -> State WriterState Doc
inlineToMarkdown opts (Emph lst) = do
contents <- inlineListToMarkdown opts lst
- return $ text "*" <> contents <> text "*"
+ return $ char '*' <> contents <> char '*'
inlineToMarkdown opts (Strong lst) = do
contents <- inlineListToMarkdown opts lst
return $ text "**" <> contents <> text "**"
@@ -285,11 +285,11 @@ inlineToMarkdown opts (Strikeout lst) = do
inlineToMarkdown opts (Superscript lst) = do
contents <- inlineListToMarkdown opts lst
let contents' = text $ substitute " " "\\ " $ render contents
- return $ text "^" <> contents' <> text "^"
+ return $ char '^' <> contents' <> char '^'
inlineToMarkdown opts (Subscript lst) = do
contents <- inlineListToMarkdown opts lst
let contents' = text $ substitute " " "\\ " $ render contents
- return $ text "~" <> contents' <> text "~"
+ return $ char '~' <> contents' <> char '~'
inlineToMarkdown opts (Quoted SingleQuote lst) = do
contents <- inlineListToMarkdown opts lst
return $ char '\'' <> contents <> char '\''