From df6e8b001a334c944bb53f0e31575afba4c28e65 Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Fri, 12 Jan 2024 18:14:25 -0600 Subject: Fix multiple search terms --- src/clog.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/clog.c b/src/clog.c index 5111b06..4d29cf9 100644 --- a/src/clog.c +++ b/src/clog.c @@ -79,6 +79,8 @@ static void process_md_output(const MD_CHAR *html, MD_SIZE size, void *buf); static int render_md(const char *in, struct kore_buf *out); void entry_query_init(struct entry_query *eq, const char *id, const char *query) { + int i = 0; + if (id != NULL) { eq->id = kore_strdup(id); } @@ -88,6 +90,11 @@ void entry_query_init(struct entry_query *eq, const char *id, const char *query) if (query != NULL) { eq->query = kore_strdup(query); + for (i = 0; i < strlen(eq->query); ++i) { + if (eq->query[i] == ' ') { + eq->query[i] = '|'; + } + } } else { eq->query = NULL; -- cgit v1.2.3