diff --git a/src/line/code/inline.rs b/src/line/code/inline.rs index 01ad077..1148966 100644 --- a/src/line/code/inline.rs +++ b/src/line/code/inline.rs @@ -12,22 +12,15 @@ impl Inline { pub fn from(line: &str) -> Option { // Parse line let regex = Regex::split_simple( - r"^`{3}([^`]*)`{3}$", + r"^`{3}([^`]+)`{3}$", line, RegexCompileFlags::DEFAULT, RegexMatchFlags::DEFAULT, ); // Extract formatted value - let value = regex.get(1)?.trim(); - - if value.is_empty() { - return None; - } - - // Result Some(Self { - value: value.to_string(), + value: regex.get(1)?.trim().to_string(), }) } }