diff options
| author | Fuwn <[email protected]> | 2024-09-14 10:17:24 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-14 10:17:24 +0000 |
| commit | 73b541007ab850a1a5452298bee8328506a6eb56 (patch) | |
| tree | 39af607901a5c000e80be6fe35239164865797ab /src/html.rs | |
| parent | chore: move development shell to just (diff) | |
| download | september-73b541007ab850a1a5452298bee8328506a6eb56.tar.xz september-73b541007ab850a1a5452298bee8328506a6eb56.zip | |
fix(html): render pre as basic text
Diffstat (limited to 'src/html.rs')
| -rw-r--r-- | src/html.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/html.rs b/src/html.rs index 299242c..64ec6ae 100644 --- a/src/html.rs +++ b/src/html.rs @@ -255,7 +255,11 @@ pub fn from_gemini( html.push_str(&format!("<blockquote>{}</blockquote>", safe(text))); } Node::PreformattedText { text, .. } => { - html.push_str(&format!("<pre>{}</pre>", safe(text))); + let mut new_text = text.to_string(); + + new_text.pop(); + + html.push_str(&format!("<pre>{new_text}</pre>")); } Node::Whitespace => {} } |