From 4c17fa174563db57fb2a72f2b9715c60d87f97d7 Mon Sep 17 00:00:00 2001
From: Mark <>
Date: Wed, 26 Jun 2024 13:50:02 +0200
Subject: [PATCH] fix html output (newlines)
---
mers_lib/Cargo.toml | 2 +-
mers_lib/src/errors/themes.rs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mers_lib/Cargo.toml b/mers_lib/Cargo.toml
index 4684f76..e06c23d 100755
--- a/mers_lib/Cargo.toml
+++ b/mers_lib/Cargo.toml
@@ -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"
diff --git a/mers_lib/src/errors/themes.rs b/mers_lib/src/errors/themes.rs
index f33ca58..6a9ce75 100644
--- a/mers_lib/src/errors/themes.rs
+++ b/mers_lib/src/errors/themes.rs
@@ -165,13 +165,13 @@ impl ThemeGen for HtmlDefaultTheme {
t.push_str("");
- html_escape::encode_text_to_string(text, t);
+ self.nocolor(text, t);
t.push_str("");
} 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", "
\n"));
}
}