fix regex condition to allow empty value

This commit is contained in:
yggverse 2024-12-03 19:36:01 +02:00
parent 429502ce72
commit facb90dfa9
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ impl List {
pub fn from(line: &str) -> Option<Self> {
// Parse line
let regex = Regex::split_simple(
r"^\*\s*(.+)$",
r"^\*\s*(.*)$",
line,
RegexCompileFlags::DEFAULT,
RegexMatchFlags::DEFAULT,

View file

@ -12,7 +12,7 @@ impl Quote {
pub fn from(line: &str) -> Option<Self> {
// Parse line
let regex = Regex::split_simple(
r"^>\s*(.+)$",
r"^>\s*(.*)$",
line,
RegexCompileFlags::DEFAULT,
RegexMatchFlags::DEFAULT,