From 836977aac8cc2ac17d286eaa294fb8b5b9f52508 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sat, 14 Nov 2020 19:10:56 +0100 Subject: [PATCH] Fix whitespace in write_tag and parser/whitespac0 --- rslib/src/search/parser.rs | 2 +- rslib/src/search/sqlwriter.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rslib/src/search/parser.rs b/rslib/src/search/parser.rs index 54fb8c553..1123cd701 100644 --- a/rslib/src/search/parser.rs +++ b/rslib/src/search/parser.rs @@ -188,7 +188,7 @@ fn group_inner(input: &str) -> IResult<&str, Vec> { } fn whitespace0(s: &str) -> IResult<&str, Vec> { - many0(one_of(" \u{3000}\t\n"))(s) + many0(one_of(" \u{3000}"))(s) } /// Optional leading space, then a (negated) group or text diff --git a/rslib/src/search/sqlwriter.rs b/rslib/src/search/sqlwriter.rs index 5ea422b04..e062bab01 100644 --- a/rslib/src/search/sqlwriter.rs +++ b/rslib/src/search/sqlwriter.rs @@ -201,7 +201,7 @@ impl SqlWriter<'_> { } } OptionalRe::Re(s) => { - if s == "*" { + if s == r"\S*" { write!(self.sql, "true").unwrap(); } else { let re = format!("(?i).* {} .*", s);