From ab0d87a3e247c07bf4cad9dbd83370f41b906aab Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 12 Oct 2024 11:30:48 +0300 Subject: [PATCH] update variable name --- .../item/page/content/text/gemini/reader/parser/header.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs index 3f5b193a..bf0a4e6c 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader/parser/header.rs @@ -14,7 +14,7 @@ pub struct Header { impl Header { pub fn from(line: &str) -> Option { // Parse line - let parsed = Regex::split_simple( + let regex = Regex::split_simple( r"^(#{1,3})\s*(.+)$", line, RegexCompileFlags::DEFAULT, @@ -22,7 +22,7 @@ impl Header { ); // Detect header level - let level = parsed.get(1)?; + let level = regex.get(1)?; let level = match level.len() { 1 => Level::H1, @@ -32,7 +32,7 @@ impl Header { }; // Detect header value - let value = parsed.get(2)?; + let value = regex.get(2)?; if value.trim().is_empty() { return None;