From 51c3847aeba4b0c77e6c5af3f031b074b0dc6d3c Mon Sep 17 00:00:00 2001 From: kageru Date: Mon, 13 Feb 2023 13:55:56 +0100 Subject: [PATCH] trim whitespace from query --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a9703f4..f036bf8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -153,7 +153,7 @@ fn add_searchbox(res: &mut String, query: &Option) -> std::fmt::Result { fn compute_results(raw_query: String) -> AnyResult { let mut body = String::with_capacity(10_000); - let (raw_filters, query) = match parser::parse_filters(&raw_query) { + let (raw_filters, query) = match parser::parse_filters(&raw_query.trim()) { Ok(q) => q, Err(e) => { let s = format!("Could not parse query: {e:?}");