From e26f824bc5a9de1772599c67ac02f631b720d377 Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Thu, 4 Jan 2024 16:16:03 -0600 Subject: Formatting --- src/clog.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'src') 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 *) "%s%s%s\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."); -- cgit v1.2.3