aboutsummaryrefslogtreecommitdiffstats
path: root/src/content-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/content-parser.c')
-rw-r--r--src/content-parser.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/content-parser.c b/src/content-parser.c
index ccb96ef..a334d28 100644
--- a/src/content-parser.c
+++ b/src/content-parser.c
@@ -231,11 +231,15 @@ blogc_content_parse_inline(const char *src)
break;
case '!':
- if (state == LINK_CLOSED && (open_code || open_code_double)) {
- b_string_append_c(rv, c);
- break;
- }
if (state == LINK_CLOSED) {
+ if (open_code || open_code_double) {
+ b_string_append_c(rv, c);
+ break;
+ }
+ if (!is_last && src[current + 1] != '[') {
+ b_string_append_c(rv, c);
+ break;
+ }
state = LINK_IMAGE;
is_image = true;
start_state = current;