aboutsummaryrefslogtreecommitdiffstats
path: root/src/content-parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-04-17 04:01:51 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-04-17 04:01:51 +0200
commit001c16ac605ee65f5688534e42c10395db3f0d5a (patch)
tree443f20ad78210851147c5484877cfd827164a09a /src/content-parser.c
parent6a19a55497730354f0545fbaf3ce99b4d942dbb7 (diff)
downloadblogc-001c16ac605ee65f5688534e42c10395db3f0d5a.tar.gz
blogc-001c16ac605ee65f5688534e42c10395db3f0d5a.tar.bz2
blogc-001c16ac605ee65f5688534e42c10395db3f0d5a.zip
content-parser: do not convert -- and --- to &ndash and &mdash inside code
Diffstat (limited to 'src/content-parser.c')
-rw-r--r--src/content-parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content-parser.c b/src/content-parser.c
index 0a87fcb..782a85d 100644
--- a/src/content-parser.c
+++ b/src/content-parser.c
@@ -364,7 +364,9 @@ blogc_content_parse_inline(const char *src)
case '-':
if (state != LINK_CLOSED)
break;
- if (current < (src_len - 1) && src[current + 1] == '-') {
+ if ((current < (src_len - 1) && src[current + 1] == '-') &&
+ !(open_code || open_code_double))
+ {
if (current < (src_len - 2) && src[current + 2] == '-') {
sb_string_append(rv, "&mdash;");
current += 2;