aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-15 08:36:49 +0000
committerFuwn <[email protected]>2022-04-15 08:36:49 +0000
commitefb38658a2530b93014d9188f5997680f5b214ae (patch)
treeb51596397275bbb2a5bb3733ec5a11fca6d41f2f /src/main.rs
parentdocs(cargo): fix readme location (diff)
downloadseptember-0.1.1.tar.xz
september-0.1.1.zip
fix(gemini_to_html): first list item clipping0.1.1
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index 7925b57..bf566a2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -131,16 +131,17 @@ fn gemini_to_html(
response_string.push('\n');
}
// Convert lists
- "*" =>
- if in_list {
- response_string.push_str(&format!(
- "<li>{}</li>\n",
- line.replace('*', "").trim_start()
- ));
- } else {
+ "*" => {
+ if !in_list {
in_list = true;
response_string.push_str("<ul>\n");
- },
+ }
+
+ response_string.push_str(&format!(
+ "<li>{}</li>\n",
+ line.replace('*', "").trim_start()
+ ));
+ }
// Convert headings
"#" => {
if in_list {