Mardkown writer: escape < and $.

This commit is contained in:
John MacFarlane 2012-04-15 11:03:52 -07:00
parent f40b2eb2e7
commit 7495d970b7
2 changed files with 5 additions and 5 deletions

View file

@ -152,7 +152,7 @@ noteToMarkdown opts num blocks = do
-- | Escape special characters for Markdown.
escapeString :: String -> String
escapeString = escapeStringUsing markdownEscapes
where markdownEscapes = backslashEscapes "\\`*_>#~^"
where markdownEscapes = backslashEscapes "\\`*_$<>#~^"
-- | Construct table of contents from list of header blocks.
tableOfContents :: WriterOptions -> [Block] -> Doc

View file

@ -528,10 +528,10 @@ LaTeX
These shouldnt be math:
- To get the famous equation, write `$e = mc^2$`.
- $22,000 is a *lot* of money. So is $34,000. (It worked if “lot” is
- \$22,000 is a *lot* of money. So is \$34,000. (It worked if “lot” is
emphasized.)
- Shoes ($20) and socks ($5).
- Escaped `$`: $73 *this should be emphasized* 23$.
- Shoes (\$20) and socks (\$5).
- Escaped `$`: \$73 *this should be emphasized* 23\$.
Heres a LaTeX table:
@ -560,7 +560,7 @@ AT&T is another way to write it.
This & that.
4 < 5.
4 \< 5.
6 \> 5.