+ Added Strikeout support to Markdown writer.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@751 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-07-21 22:07:10 +00:00
parent 9b664073d5
commit dc60aa3aea

View file

@ -107,8 +107,8 @@ wrappedMarkdown opts sect = do
-- | Escape special characters for Markdown.
escapeString :: String -> String
escapeString = backslashEscape "`<\\*_^" .
escapeCharAsString '\160' "&nbsp;"
escapeString = escapeStringUsing markdownEscapes
where markdownEscapes = ('\160', "&nbsp;"):(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 "**"