Skip to content

Commit

Permalink
fix regex condition to allow empty value
Browse files Browse the repository at this point in the history
  • Loading branch information
yggverse committed Dec 3, 2024
1 parent 429502c commit facb90d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/line/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/line/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit facb90d

Please sign in to comment.