Skip to content

Commit

Permalink
Add = highlight character to escape_chars list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Cheatham committed May 29, 2014
1 parent 34de15c commit 96ea6b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ext/redcarpet/markdown.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 6 additions & 0 deletions test/markdown_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ def test_emphasis_escaping
html_equal "<p><strong>foo*</strong> <em>dd_dd</em></p>\n", markdown
end

def test_char_escaping_when_highlighting
markdown = "==attribute\\==="
output = render_with({highlight: true}, markdown)
html_equal "<p><mark>attribute=</mark></p>\n", output
end

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

0 comments on commit 96ea6b6

Please sign in to comment.