From 9cd4e8571e8657a7c477637f095c2bfafb765e77 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 19 Jul 2025 11:43:42 -0400 Subject: [PATCH] Create accessible function --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/lib.rs | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac3e0a8..f455297 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3167,7 +3167,7 @@ dependencies = [ [[package]] name = "rss_content" -version = "0.1.4" +version = "0.1.5" dependencies = [ "ego-tree", "iced", diff --git a/Cargo.toml b/Cargo.toml index f001cc3..da4fb6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rss_content" -version = "0.1.4" +version = "0.1.5" edition = "2024" [dependencies] diff --git a/src/lib.rs b/src/lib.rs index 7e0633c..3af857e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,6 +15,11 @@ pub enum Content { Ignore } +pub fn parse_content(c: &str) -> Vec{ + + process_content(itemize_content(c)) +} + fn markdownify_child(item: &Item) -> String { let mut result = "".to_owned(); match markdown_content(&item) { @@ -141,7 +146,7 @@ enum Item { } -pub fn itemize_content(content: &str) -> Vec { +fn itemize_content(content: &str) -> Vec { let frag = Html::parse_fragment(content); frag.root_element().children().map(|e|{ parse_items(e)