From b5a98c5d2c7ac2b5baf0cb1cec15a40a806bdc96 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 2 Dec 2024 20:24:01 +0200 Subject: [PATCH] define new consts --- .../window/tab/item/page/content/text/gemini/reader.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs index 150649db..96afaf76 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs @@ -28,6 +28,8 @@ use gtk::{ use std::{collections::HashMap, rc::Rc}; pub const DATE_FORMAT: &str = "%Y-%m-%d"; +pub const EXTERNAL_LINK_INDICATOR: &str = "⇖"; +pub const LIST_ITEM: &str = "•"; pub const NEW_LINE: &str = "\n"; pub struct Reader { @@ -153,7 +155,7 @@ impl Reader { // Append external indicator on exist if let Some(is_external) = link.is_external { if is_external { - alt.push("⇖".to_string()); + alt.push(EXTERNAL_LINK_INDICATOR.to_string()); } } @@ -198,7 +200,7 @@ impl Reader { // Append value to buffer buffer.insert_with_tags( &mut buffer.end_iter(), - format!("• {}", list.value).as_str(), + format!("{LIST_ITEM} {}", list.value).as_str(), &[&tag.list.text_tag], ); buffer.insert(&mut buffer.end_iter(), NEW_LINE);