From cbefb0ffb583a877a082bc336f2d61be7e773a5d Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Mon, 18 May 2015 19:12:00 -0300 Subject: content-parser: fix and test horizontal rules --- src/content-parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/content-parser.c b/src/content-parser.c index aa4db79..f412810 100644 --- a/src/content-parser.c +++ b/src/content-parser.c @@ -548,6 +548,8 @@ blogc_content_parse(const char *src) case CONTENT_UNORDERED_LIST_OR_HORIZONTAL_RULE: if (c == d) { + if (is_last) + goto hr; state = CONTENT_HORIZONTAL_RULE; break; } @@ -558,9 +560,10 @@ blogc_content_parse(const char *src) break; case CONTENT_HORIZONTAL_RULE: - if (c == d) { + if (c == d && !is_last) { break; } +hr: if (c == '\n' || c == '\r' || is_last) { b_string_append(rv, "
\n"); state = CONTENT_START_LINE; -- cgit v1.2.3-18-g5258