From 4e50621e3cbc6c7006bf84eca744c73050bbdfad Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 5 Dec 2024 05:35:43 +0200 Subject: [PATCH] rename variables --- .../page/content/text/gemini/reader/ansi.rs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader/ansi.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader/ansi.rs index a3bacf19..5386617e 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader/ansi.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader/ansi.rs @@ -20,28 +20,30 @@ pub fn format(source_code: &str) -> Vec<(TextTag, String)> { let tag = Tag::new(); // Apply supported decorations - if let Some(fg) = entity.fg { - tag.text_tag.set_foreground_rgba(Some(&color_to_rgba(fg))); + if let Some(color) = entity.fg { + tag.text_tag + .set_foreground_rgba(Some(&color_to_rgba(color))); } - if let Some(bg) = entity.bg { - tag.text_tag.set_background_rgba(Some(&color_to_rgba(bg))); + if let Some(color) = entity.bg { + tag.text_tag + .set_background_rgba(Some(&color_to_rgba(color))); } - if let Some(italic) = entity.italic { - if italic { + if let Some(is_italic) = entity.italic { + if is_italic { tag.text_tag.set_style(Style::Italic); } } - if let Some(underline) = entity.underline { - if underline { + if let Some(is_underline) = entity.underline { + if is_underline { tag.text_tag.set_underline(Underline::Single); } } - if let Some(strikethrough) = entity.strikethrough { - tag.text_tag.set_strikethrough(strikethrough); + if let Some(is_strikethrough) = entity.strikethrough { + tag.text_tag.set_strikethrough(is_strikethrough); } // Append