aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-07-18 19:15:42 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-07-18 19:15:42 +0000
commitf9ec6797bd50d3c2d63c3b35ec17d8a49ece94f0 (patch)
treee2b07b114d014488367bdc822dab131419f72266
parentd84c678cdcead4f1203596476fa197f97c075234 (diff)
downloadpandoc-f9ec6797bd50d3c2d63c3b35ec17d8a49ece94f0.tar.gz
Changed escapes in markdown writer.
- >, not <, is escapable in standard markdown.! - also # is now escaped - Partiall resolves Issue #96. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1600 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs2
-rw-r--r--tests/writer.markdown10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index f376ac0c6..b2c1dc175 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -102,7 +102,7 @@ noteToMarkdown opts num blocks = do
-- | Escape special characters for Markdown.
escapeString :: String -> String
escapeString = escapeStringUsing markdownEscapes
- where markdownEscapes = backslashEscapes "`<\\*_^~"
+ where markdownEscapes = backslashEscapes "\\`*_>#~^"
-- | Convert bibliographic information into Markdown header.
metaToMarkdown :: WriterOptions -> Meta -> State WriterState Doc
diff --git a/tests/writer.markdown b/tests/writer.markdown
index 6bbfe257c..f377816c6 100644
--- a/tests/writer.markdown
+++ b/tests/writer.markdown
@@ -72,7 +72,7 @@ E-mail style:
>
> > nested
-This should not be a block quote: 2 > 1.
+This should not be a block quote: 2 \> 1.
And a following paragraph.
@@ -537,9 +537,9 @@ AT&T is another way to write it.
This & that.
-4 \< 5.
+4 < 5.
-6 > 5.
+6 \> 5.
Backslash: \\
@@ -561,9 +561,9 @@ Left paren: (
Right paren: )
-Greater-than: >
+Greater-than: \>
-Hash: #
+Hash: \#
Period: .