Fixes #16: New lines lost when only a \n is given
This commit is contained in:
parent
598baa2ace
commit
54f531a0a8
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue