mirror of
https://github.com/YGGverse/ggemtext.git
synced 2026-03-31 17:15:33 +00:00
fix regex condition to allow empty value
This commit is contained in:
parent
429502ce72
commit
facb90dfa9
2 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ impl List {
|
||||||
pub fn from(line: &str) -> Option<Self> {
|
pub fn from(line: &str) -> Option<Self> {
|
||||||
// Parse line
|
// Parse line
|
||||||
let regex = Regex::split_simple(
|
let regex = Regex::split_simple(
|
||||||
r"^\*\s*(.+)$",
|
r"^\*\s*(.*)$",
|
||||||
line,
|
line,
|
||||||
RegexCompileFlags::DEFAULT,
|
RegexCompileFlags::DEFAULT,
|
||||||
RegexMatchFlags::DEFAULT,
|
RegexMatchFlags::DEFAULT,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ impl Quote {
|
||||||
pub fn from(line: &str) -> Option<Self> {
|
pub fn from(line: &str) -> Option<Self> {
|
||||||
// Parse line
|
// Parse line
|
||||||
let regex = Regex::split_simple(
|
let regex = Regex::split_simple(
|
||||||
r"^>\s*(.+)$",
|
r"^>\s*(.*)$",
|
||||||
line,
|
line,
|
||||||
RegexCompileFlags::DEFAULT,
|
RegexCompileFlags::DEFAULT,
|
||||||
RegexMatchFlags::DEFAULT,
|
RegexMatchFlags::DEFAULT,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue