+ 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:
parent
9b664073d5
commit
dc60aa3aea
1 changed files with 5 additions and 2 deletions
|
@ -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 "**"
|
||||
|
|
Loading…
Reference in a new issue