git.iko.soy/typeable/pandoc
on master help sign in
Mardkown writer: escape < and $.
commit7495d970b7e56de6a484ec2ebd05511317e2b812 authorJohn MacFarlane <fiddlosopher@gmail.com> dateSun 15 Apr 2012, 11:03 (15 years ago) parentf40b2eb
2 files changed+5−5
src/Text/Pandoc/Writers/Markdown.hs+1−1 tests/writer.markdown+4−4
src/Text/Pandoc/Writers/Markdown.hs+1−1
@@ -152,7 +152,7 @@ noteToMarkdown opts num blocks = do
152152-- | Escape special characters for Markdown.
153153escapeString :: String -> String
154154escapeString = escapeStringUsing markdownEscapes
155− where markdownEscapes = backslashEscapes "\\`*_>#~^"
155+ where markdownEscapes = backslashEscapes "\\`*_$<>#~^"
156156
157157-- | Construct table of contents from list of header blocks.
158158tableOfContents :: WriterOptions -> [Block] -> Doc
tests/writer.markdown+4−4
@@ -528,10 +528,10 @@ LaTeX
528528These shouldn’t be math:
529529
530530- To get the famous equation, write `$e = mc^2$`.
531−- $22,000 is a *lot* of money. So is $34,000. (It worked if “lot” is
531+- \$22,000 is a *lot* of money. So is \$34,000. (It worked if “lot” is
532532 emphasized.)
533−- Shoes ($20) and socks ($5).
534−- Escaped `$`: $73 *this should be emphasized* 23$.
533+- Shoes (\$20) and socks (\$5).
534+- Escaped `$`: \$73 *this should be emphasized* 23\$.
535535
536536Here’s a LaTeX table:
537537
@@ -560,7 +560,7 @@ AT&T is another way to write it.
560560
561561This & that.
562562
563−4 < 5.
563+4 \< 5.
564564
5655656 \> 5.
566566