diff options
author | default <nobody@localhost> | 2022-11-01 19:15:56 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2022-11-01 19:15:56 +0100 |
commit | 5dc26534b6abeeefc40433a1a827004050c49a01 (patch) | |
tree | 081ddcb29c6baf931fae121b281b2e9f5c905c70 /format.c | |
parent | ccb82367ad78587f2f9e881e7bb9e38f0f4ecdda (diff) |
Fixed a bug in not_really_markdown() that confused code with pre markup.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -54,7 +54,7 @@ d_char *not_really_markdown(char *content, d_char **f_content) while (xs_list_iter(&p, &v)) { if ((n & 0x1)) { /* markup */ - if (xs_startswith(v, "`")) { + if (xs_startswith(v, "`") && v[1] != '\n') { xs *s1 = xs_crop(xs_dup(v), 1, -1); xs *s2 = xs_fmt("<code>%s</code>", s1); wrk = xs_str_cat(wrk, s2); @@ -77,7 +77,6 @@ d_char *not_really_markdown(char *content, d_char **f_content) wrk = xs_str_cat(wrk, s1); } else - /* what the hell is this */ wrk = xs_str_cat(wrk, v); } else |