diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-21 22:07:10 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-21 22:07:10 +0000 |
commit | dc60aa3aeabbe85fe23fc1b55a347ce78d993f08 (patch) | |
tree | 22f32c240d22070c67883ebf008652ca00665098 /src/Text | |
parent | 9b664073d5729b875b7661a0f96654ff240a3f73 (diff) | |
download | pandoc-dc60aa3aeabbe85fe23fc1b55a347ce78d993f08.tar.gz |
+ Added Strikeout support to Markdown writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@751 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 764a146ac..1af9b9625 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -107,8 +107,8 @@ wrappedMarkdown opts sect = do -- | Escape special characters for Markdown. escapeString :: String -> String -escapeString = backslashEscape "`<\\*_^" . - escapeCharAsString '\160' " " +escapeString = escapeStringUsing markdownEscapes + where markdownEscapes = ('\160', " "):(backslashEscapes "`<\\*_^") -- | Convert bibliographic information into Markdown header. metaToMarkdown :: WriterOptions -> Meta -> State WriterState Doc @@ -276,6 +276,9 @@ inlineToMarkdown :: WriterOptions -> Inline -> State WriterState Doc inlineToMarkdown opts (Emph lst) = do contents <- inlineListToMarkdown opts lst return $ text "*" <> contents <> text "*" +inlineToMarkdown opts (Strikeout lst) = do + contents <- inlineListToMarkdown opts lst + return $ text "~" <> contents <> text "~" inlineToMarkdown opts (Strong lst) = do contents <- inlineListToMarkdown opts lst return $ text "**" <> contents <> text "**" |