From 96ea6b6617cdf4ad7338e14eb4145b98611288b0 Mon Sep 17 00:00:00 2001 From: Jonathan Cheatham Date: Thu, 29 May 2014 10:39:53 -0700 Subject: [PATCH] Add = highlight character to escape_chars list --- ext/redcarpet/markdown.c | 2 +- test/markdown_test.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/redcarpet/markdown.c b/ext/redcarpet/markdown.c index b4983bb9..98d880f8 100644 --- a/ext/redcarpet/markdown.c +++ b/ext/redcarpet/markdown.c @@ -845,7 +845,7 @@ char_quote(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t offse static size_t char_escape(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t offset, size_t size) { - static const char *escape_chars = "\\`*_{}[]()#+-.!:|&<>^~"; + static const char *escape_chars = "\\`*_{}[]()#+-.!:|&<>^~="; struct buf work = { 0, 0, 0, 0 }; if (size > 1) { diff --git a/test/markdown_test.rb b/test/markdown_test.rb index bc36051b..d59da596 100644 --- a/test/markdown_test.rb +++ b/test/markdown_test.rb @@ -285,6 +285,12 @@ def test_emphasis_escaping html_equal "

foo* dd_dd

\n", markdown end + def test_char_escaping_when_highlighting + markdown = "==attribute\\===" + output = render_with({highlight: true}, markdown) + html_equal "

attribute=

\n", output + end + def test_ordered_lists_with_lax_spacing markdown = "Foo:\n1. Foo\n2. Bar" output = render_with({lax_spacing: true}, markdown)