mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00
fix html output (newlines)
This commit is contained in:
parent
12d90a8022
commit
4c17fa1745
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "mers_lib"
|
||||
version = "0.8.17"
|
||||
version = "0.8.18"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "library to use the mers language in other projects"
|
||||
|
@ -165,13 +165,13 @@ impl ThemeGen for HtmlDefaultTheme {
|
||||
t.push_str("<span style=\"color:");
|
||||
t.push_str(color);
|
||||
t.push_str(";\">");
|
||||
html_escape::encode_text_to_string(text, t);
|
||||
self.nocolor(text, t);
|
||||
t.push_str("</span>");
|
||||
} else {
|
||||
html_escape::encode_text_to_string(text, t);
|
||||
self.nocolor(text, t);
|
||||
}
|
||||
}
|
||||
fn nocolor(&self, text: &str, t: &mut String) {
|
||||
t.push_str(text);
|
||||
t.push_str(html_escape::encode_text(text).replace("\n", "<br>\n"));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user