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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/content-parser.c b/src/content-parser.c
index 7e2310f..f5e3aec 100644
--- a/src/content-parser.c
+++ b/src/content-parser.c
@@ -361,6 +361,21 @@ blogc_content_parse_inline(const char *src)
}
break;
+ case '-':
+ if (state != LINK_CLOSED)
+ break;
+ if (current < (src_len - 1) && src[current + 1] == '-') {
+ if (current < (src_len - 2) && src[current + 2] == '-') {
+ sb_string_append(rv, "&ndash;");
+ current += 2;
+ }
+ else {
+ sb_string_append(rv, "&mdash;");
+ current += 1;
+ }
+ }
+ break;
+
case '&':
if (state == LINK_CLOSED)
sb_string_append(rv, "&amp;");