summaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-05-23 10:01:37 +0200
committerdefault <nobody@localhost>2024-05-23 10:01:37 +0200
commit8cf7559a7e21c5757455b948814d61e6e96f08f1 (patch)
treec9a9d6d637977f97ebfc83ba36ae794fe5f9d8c1 /format.c
parent63e0ca5abac0f00121f724927c25edaf822097a9 (diff)
Added more const.
Diffstat (limited to 'format.c')
-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)
/* formats a line */
{
xs_str *s = xs_str_new(NULL);
- char *p, *v;
+ char *p;
+ const char *v;
/* split by markup */
xs *sm = xs_regex_split(line,
@@ -155,7 +156,8 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag
int in_pre = 0;
int in_blq = 0;
xs *list;
- char *p, *v;
+ char *p;
+ const char *v;
/* work by lines */
list = xs_split(content, "\n");
@@ -234,7 +236,7 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag
/* traditional emoticons */
xs *d = emojis();
int c = 0;
- char *k, *v;
+ const char *k, *v;
while (xs_dict_next(d, &k, &v, &c)) {
const char *t = NULL;
@@ -280,7 +282,8 @@ xs_str *sanitize(const char *content)
xs_str *s = xs_str_new(NULL);
xs *sl;
int n = 0;
- char *p, *v;
+ char *p;
+ const char *v;
sl = xs_regex_split(content, "</?[^>]+>");