forked from MIrrors/bin
Fixes #16: New lines lost when only a \n is given
This commit is contained in:
@@ -111,7 +111,7 @@ async fn show_paste(key: String, plaintext: IsPlaintextRequest) -> Result<Conten
|
||||
// Add <code> tags to enable line numbering with CSS
|
||||
let html = format!(
|
||||
"<code>{}</code>",
|
||||
code_highlighted.replace("\n", "</code><code>")
|
||||
code_highlighted.replace("\n", "\n</code><code>")
|
||||
);
|
||||
|
||||
let content = MarkupDisplay::new_safe(Cow::Borrowed(&html), AskamaHtml);
|
||||
|
||||
Reference in New Issue
Block a user