summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2022-11-01 19:15:56 +0100
committerGravatar default2022-11-01 19:15:56 +0100
commit5dc26534b6abeeefc40433a1a827004050c49a01 (patch)
tree081ddcb29c6baf931fae121b281b2e9f5c905c70
parentAnother tweak to the #redir after like or boost. (diff)
downloadsnac2-5dc26534b6abeeefc40433a1a827004050c49a01.tar.gz
snac2-5dc26534b6abeeefc40433a1a827004050c49a01.tar.xz
snac2-5dc26534b6abeeefc40433a1a827004050c49a01.zip
Fixed a bug in not_really_markdown() that confused code with pre markup.
-rw-r--r--format.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/format.c b/format.c
index c888f0f..23ef541 100644
--- a/format.c
+++ b/format.c
@@ -54,7 +54,7 @@ d_char *not_really_markdown(char *content, d_char **f_content)
54 while (xs_list_iter(&p, &v)) { 54 while (xs_list_iter(&p, &v)) {
55 if ((n & 0x1)) { 55 if ((n & 0x1)) {
56 /* markup */ 56 /* markup */
57 if (xs_startswith(v, "`")) { 57 if (xs_startswith(v, "`") && v[1] != '\n') {
58 xs *s1 = xs_crop(xs_dup(v), 1, -1); 58 xs *s1 = xs_crop(xs_dup(v), 1, -1);
59 xs *s2 = xs_fmt("<code>%s</code>", s1); 59 xs *s2 = xs_fmt("<code>%s</code>", s1);
60 wrk = xs_str_cat(wrk, s2); 60 wrk = xs_str_cat(wrk, s2);
@@ -77,7 +77,6 @@ d_char *not_really_markdown(char *content, d_char **f_content)
77 wrk = xs_str_cat(wrk, s1); 77 wrk = xs_str_cat(wrk, s1);
78 } 78 }
79 else 79 else
80 /* what the hell is this */
81 wrk = xs_str_cat(wrk, v); 80 wrk = xs_str_cat(wrk, v);
82 } 81 }
83 else 82 else