From 699f4b4032431fbd7f4fbf13fe9e2b085225b215 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 24 Feb 2019 23:12:40 +0100 Subject: blogc: content: do not escape inline code this is more compatible with markdown spec[1] [1] https://daringfireball.net/projects/markdown/syntax#code --- tests/blogc/check_content_parser.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/blogc/check_content_parser.c b/tests/blogc/check_content_parser.c index cd8ba57..de15bac 100644 --- a/tests/blogc/check_content_parser.c +++ b/tests/blogc/check_content_parser.c @@ -1951,11 +1951,15 @@ test_content_parse_inline_code(void **state) free(html); html = blogc_content_parse_inline("`bo\\`\\`la`\n"); assert_non_null(html); - assert_string_equal(html, "bo``la\n"); + assert_string_equal(html, "bo\\`\\`la\n"); free(html); html = blogc_content_parse_inline("``bo\\`\\`la``\n"); assert_non_null(html); - assert_string_equal(html, "bo``la\n"); + assert_string_equal(html, "bo\\`\\`la\n"); + free(html); + html = blogc_content_parse_inline("``bo`la``\n"); + assert_non_null(html); + assert_string_equal(html, "bo`la\n"); free(html); html = blogc_content_parse_inline("``bola\n"); assert_non_null(html); @@ -2009,7 +2013,11 @@ test_content_parse_inline_link(void **state) free(html); html = blogc_content_parse_inline("[``bola(2)[3]**!\\```](http://example.org/)\n"); assert_non_null(html); - assert_string_equal(html, "bola(2)[3]**!`\n"); + assert_string_equal(html, "bola(2)[3]**!\\`\n"); + free(html); + html = blogc_content_parse_inline("[``bola(2)[3]**!```](http://example.org/)\n"); + assert_non_null(html); + assert_string_equal(html, "bola(2)[3]**!`\n"); free(html); html = blogc_content_parse_inline("test suite!)\n" "depends on [cmocka](http://cmocka.org/), though.\n"); -- cgit v1.2.3-18-g5258