summaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--format.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/format.c b/format.c
index df3b5d9..b021f55 100644
--- a/format.c
+++ b/format.c
@@ -82,7 +82,8 @@ static xs_str *format_line(const char *line, xs_list **attach)
82/* formats a line */ 82/* formats a line */
83{ 83{
84 xs_str *s = xs_str_new(NULL); 84 xs_str *s = xs_str_new(NULL);
85 char *p, *v; 85 char *p;
86 const char *v;
86 87
87 /* split by markup */ 88 /* split by markup */
88 xs *sm = xs_regex_split(line, 89 xs *sm = xs_regex_split(line,
@@ -155,7 +156,8 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag
155 int in_pre = 0; 156 int in_pre = 0;
156 int in_blq = 0; 157 int in_blq = 0;
157 xs *list; 158 xs *list;
158 char *p, *v; 159 char *p;
160 const char *v;
159 161
160 /* work by lines */ 162 /* work by lines */
161 list = xs_split(content, "\n"); 163 list = xs_split(content, "\n");
@@ -234,7 +236,7 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag
234 /* traditional emoticons */ 236 /* traditional emoticons */
235 xs *d = emojis(); 237 xs *d = emojis();
236 int c = 0; 238 int c = 0;
237 char *k, *v; 239 const char *k, *v;
238 240
239 while (xs_dict_next(d, &k, &v, &c)) { 241 while (xs_dict_next(d, &k, &v, &c)) {
240 const char *t = NULL; 242 const char *t = NULL;
@@ -280,7 +282,8 @@ xs_str *sanitize(const char *content)
280 xs_str *s = xs_str_new(NULL); 282 xs_str *s = xs_str_new(NULL);
281 xs *sl; 283 xs *sl;
282 int n = 0; 284 int n = 0;
283 char *p, *v; 285 char *p;
286 const char *v;
284 287
285 sl = xs_regex_split(content, "</?[^>]+>"); 288 sl = xs_regex_split(content, "</?[^>]+>");
286 289