tangled
alpha
login
or
join now
fuwn.net
/
germ
0
fork
atom
🦠 The Definitive Gemini Protocol Toolkit
gemini
gemini-protocol
gemtext
parser
zero-dependency
toolkit
ast
converter
html
markdown
cli
networking
0
fork
atom
overview
issues
pulls
pipelines
feat(ast): arbitrary heading depth generation
fuwn.net
2 years ago
f16682d9
5d9579dd
verified
This commit was signed with the committer's
known signature
.
fuwn.net
SSH Key Fingerprint:
SHA256:VPdFPyPbd6JkoMyWUdZ/kkTcIAt3sxjXD2XSAZ7FYC4=
+3
-11
2 changed files
expand all
collapse all
unified
split
Cargo.toml
src
ast
container.rs
+1
-1
Cargo.toml
···
2
2
3
3
[package]
4
4
name = "germ"
5
5
-
version = "0.4.4"
5
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
127
-
Node::Heading { level, text } => gemtext.push_str(&format!(
128
128
-
"{} {}\n",
129
129
-
match level {
130
130
-
1 => "#",
131
131
-
2 => "##",
132
132
-
3 => "###",
133
133
-
_ => "",
134
134
-
},
135
135
-
text
136
136
-
)),
127
127
+
Node::Heading { level, text } =>
128
128
+
gemtext.push_str(&format!("{} {}\n", "#".repeat(*level), text)),
137
129
Node::List(items) => gemtext.push_str(&format!(
138
130
"{}\n",
139
131
items