aboutsummaryrefslogtreecommitdiff
path: root/src/clog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/clog.c')
-rw-r--r--src/clog.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/clog.c b/src/clog.c
index 2705558..8d3f0c8 100644
--- a/src/clog.c
+++ b/src/clog.c
@@ -589,10 +589,7 @@ int sql_render_index(struct kore_pgsql *sql, struct entry_query *eq) {
kore_buf_appendf(
eq->result,
(const char *) "<tr><td><a href=\"/entries/%s\">%s</a></td><td>%s</td><td>%s</td></tr>\r\n",
- id,
- title,
- created_at,
- updated_at
+ id, title, created_at, updated_at
);
}
@@ -623,21 +620,11 @@ int sql_insert_entry(const char *id, const char *title, const char *body) {
if (id == NULL) {
err = kore_pgsql_query_params(
- &sql,
- q_insert_entry,
- 0,
- 2,
- KORE_PGSQL_PARAM_TEXT(title),
- KORE_PGSQL_PARAM_TEXT(body)
+ &sql, q_insert_entry, 0, 2, KORE_PGSQL_PARAM_TEXT(title), KORE_PGSQL_PARAM_TEXT(body)
);
} else {
err = kore_pgsql_query_params(
- &sql,
- q_insert_entry_with_id,
- 0,
- 3,
- KORE_PGSQL_PARAM_TEXT(id),
- KORE_PGSQL_PARAM_TEXT(title),
+ &sql, q_insert_entry_with_id, 0, 3, KORE_PGSQL_PARAM_TEXT(id), KORE_PGSQL_PARAM_TEXT(title),
KORE_PGSQL_PARAM_TEXT(body)
);
}
@@ -666,12 +653,7 @@ int sql_update_entry(const char *id, const char *title, const char *body) {
}
err = kore_pgsql_query_params(
- &sql,
- q_update_entry,
- 0,
- 3,
- KORE_PGSQL_PARAM_TEXT(title),
- KORE_PGSQL_PARAM_TEXT(body),
+ &sql, q_update_entry, 0, 3, KORE_PGSQL_PARAM_TEXT(title), KORE_PGSQL_PARAM_TEXT(body),
KORE_PGSQL_PARAM_TEXT(id)
);
if (err == KORE_RESULT_ERROR) {
@@ -726,9 +708,12 @@ static int render_md(const char *in, struct kore_buf *out) {
parser_flags |= MD_FLAG_TABLES;
parser_flags |= MD_FLAG_STRIKETHROUGH;
+ // parser_flags |= MD_FLAG_TASKLISTS;
// render_flags |= MD_HTML_FLAG_DEBUG;
- err = md_html(in, (MD_SIZE) strlen(in), process_md_output, (void*) out, parser_flags, renderer_flags);
+ err = md_html(
+ in, (MD_SIZE) strlen(in), process_md_output, (void*) out, parser_flags, renderer_flags
+ );
if(err != 0) {
kore_log(LOG_ERR, "Parsing Markdown failed.");