From d8f2c6861ea1bdba8ccd90b2b1ca69af1169eb7b Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 15 Apr 2022 08:36:49 +0000 Subject: fix(gemini_to_html): first list item clipping --- src/main.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src') 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!( - "
  • {}
  • \n", - line.replace('*', "").trim_start() - )); - } else { + "*" => { + if !in_list { in_list = true; response_string.push_str("