aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content-parser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/content-parser.c b/src/content-parser.c
index 041e96d..ab3d9c3 100644
--- a/src/content-parser.c
+++ b/src/content-parser.c
@@ -249,7 +249,8 @@ blogc_content_parse_inline(const char *src)
spaces++;
b_string_append_c(rv, c);
}
- break;
+ if (!is_last)
+ break;
case '\n':
case '\r':
@@ -258,7 +259,7 @@ blogc_content_parse_inline(const char *src)
b_string_append(rv, "<br />\n");
spaces = 0;
}
- else
+ else if (c == '\n' || c == '\r')
b_string_append_c(rv, c);
}
break;
@@ -301,6 +302,10 @@ blogc_content_parse_inline(const char *src)
current++;
}
+ // FIXME: do not just free this leftover memory
+ free(tmp);
+ free(tmp2);
+
return b_string_free(rv, false);
}