🦠 The Definitive Gemini Protocol Toolkit
gemini gemini-protocol gemtext parser zero-dependency toolkit ast converter html markdown cli networking

feat(ast): arbitrary heading depth generation

fuwn.net f16682d9 5d9579dd

verified
+3 -11
+1 -1
Cargo.toml
··· 2 2 3 3 [package] 4 4 name = "germ" 5 - version = "0.4.4" 5 + version = "0.4.5" 6 6 authors = ["Fuwn <contact@fuwn.me>"] 7 7 edition = "2021" 8 8 description = "The Ultimate Gemini Toolkit."
+2 -10
src/ast/container.rs
··· 124 124 to, 125 125 text.clone().map_or_else(String::new, |text| format!(" {text}")), 126 126 )), 127 - Node::Heading { level, text } => gemtext.push_str(&format!( 128 - "{} {}\n", 129 - match level { 130 - 1 => "#", 131 - 2 => "##", 132 - 3 => "###", 133 - _ => "", 134 - }, 135 - text 136 - )), 127 + Node::Heading { level, text } => 128 + gemtext.push_str(&format!("{} {}\n", "#".repeat(*level), text)), 137 129 Node::List(items) => gemtext.push_str(&format!( 138 130 "{}\n", 139 131 items