From 9489d407365ad654928b12a01e448aed1ea17b5b Mon Sep 17 00:00:00 2001 From: Jeremy Sharpe Date: Wed, 2 Dec 2015 23:06:55 -0500 Subject: [PATCH] Change char_escape to pass its backslash through normal_text if it isn't escaping anything. This prevents this one weird case where test isn't passed through normal_text. --- src/document.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/document.c b/src/document.c index c0886158..769c8bcb 100644 --- a/src/document.c +++ b/src/document.c @@ -942,7 +942,12 @@ char_escape(hoedown_buffer *ob, hoedown_document *doc, uint8_t *data, size_t off } else hoedown_buffer_putc(ob, data[1]); } else if (size == 1) { - hoedown_buffer_putc(ob, data[0]); + if (doc->md.normal_text) { + work.data = data; + work.size = 1; + doc->md.normal_text(ob, &work, &doc->data); + } + else hoedown_buffer_putc(ob, data[0]); } return 2;