]> granicus.if.org Git - multimarkdown/commitdiff
FIXED: Need separate check for escaped characters in CriticMarkup parsing
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sun, 7 May 2017 19:29:57 +0000 (15:29 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sun, 7 May 2017 19:29:57 +0000 (15:29 -0400)
Sources/libMultiMarkdown/critic_markup.c

index bed4dff40c3035a9256442d58d7102c2752f8a3a..17457e751a89bd7707d5d0262d0ee31095c2d7e7 100644 (file)
@@ -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);