From c4ba973b626abb1ed7ee310d0baa49e378f785ba Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Sun, 7 May 2017 15:29:57 -0400 Subject: [PATCH] FIXED: Need separate check for escaped characters in CriticMarkup parsing --- Sources/libMultiMarkdown/critic_markup.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sources/libMultiMarkdown/critic_markup.c b/Sources/libMultiMarkdown/critic_markup.c index bed4dff..17457e7 100644 --- a/Sources/libMultiMarkdown/critic_markup.c +++ b/Sources/libMultiMarkdown/critic_markup.c @@ -83,6 +83,16 @@ token * mmd_critic_tokenize_string(const char * source, size_t start, size_t len trie_insert(ac, "{>>", CM_COM_OPEN); trie_insert(ac, "<<}", CM_COM_CLOSE); + trie_insert(ac, "\\{", CM_PLAIN_TEXT); + trie_insert(ac, "\\}", CM_PLAIN_TEXT); + trie_insert(ac, "\\{", CM_PLAIN_TEXT); + trie_insert(ac, "\\+", CM_PLAIN_TEXT); + trie_insert(ac, "\\-", CM_PLAIN_TEXT); + trie_insert(ac, "\\~", CM_PLAIN_TEXT); + trie_insert(ac, "\\>", CM_PLAIN_TEXT); + trie_insert(ac, "\\=", CM_PLAIN_TEXT); + + ac_trie_prepare(ac); match * m = ac_trie_leftmost_longest_search(ac, source, start, len); -- 2.40.0