From facb90dfa95a80b2d3da88b5e175384803d279ca Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 3 Dec 2024 19:36:01 +0200 Subject: [PATCH] fix regex condition to allow empty value --- src/line/list.rs | 2 +- src/line/quote.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/line/list.rs b/src/line/list.rs index 2a1f328..9cfb721 100644 --- a/src/line/list.rs +++ b/src/line/list.rs @@ -12,7 +12,7 @@ impl List { pub fn from(line: &str) -> Option { // Parse line let regex = Regex::split_simple( - r"^\*\s*(.+)$", + r"^\*\s*(.*)$", line, RegexCompileFlags::DEFAULT, RegexMatchFlags::DEFAULT, diff --git a/src/line/quote.rs b/src/line/quote.rs index 128193b..39dae62 100644 --- a/src/line/quote.rs +++ b/src/line/quote.rs @@ -12,7 +12,7 @@ impl Quote { pub fn from(line: &str) -> Option { // Parse line let regex = Regex::split_simple( - r"^>\s*(.+)$", + r"^>\s*(.*)$", line, RegexCompileFlags::DEFAULT, RegexMatchFlags::DEFAULT,