diff --git a/DiscordChatExporter/Resources/ExportService/DarkTheme.css b/DiscordChatExporter/Resources/ExportService/DarkTheme.css index e5e20004..9ca9d5b5 100644 --- a/DiscordChatExporter/Resources/ExportService/DarkTheme.css +++ b/DiscordChatExporter/Resources/ExportService/DarkTheme.css @@ -14,8 +14,11 @@ a:hover { text-decoration: underline; } div.pre { background-color: #2F3136; + color: rgb(131, 148, 150); font-family: Consolas, Courier New, Courier, Monospace; + margin-top: 4px; padding: 8px; + white-space: pre; } span.pre { @@ -23,6 +26,7 @@ span.pre { font-family: Consolas, Courier New, Courier, Monospace; padding-left: 2px; padding-right: 2px; + white-space: pre; } div#info { diff --git a/DiscordChatExporter/Resources/ExportService/LightTheme.css b/DiscordChatExporter/Resources/ExportService/LightTheme.css index 922789ef..83b139ad 100644 --- a/DiscordChatExporter/Resources/ExportService/LightTheme.css +++ b/DiscordChatExporter/Resources/ExportService/LightTheme.css @@ -14,7 +14,9 @@ a:hover { text-decoration: underline; } div.pre { background-color: #F9F9F9; + color: rgb(101, 123, 131); font-family: Consolas, Courier New, Courier, Monospace; + margin-top: 4px; padding: 8px; } diff --git a/DiscordChatExporter/Services/ExportService.cs b/DiscordChatExporter/Services/ExportService.cs index e08ac602..2d3e123d 100644 --- a/DiscordChatExporter/Services/ExportService.cs +++ b/DiscordChatExporter/Services/ExportService.cs @@ -218,18 +218,18 @@ namespace DiscordChatExporter.Services // Encode HTML content = HtmlEncode(content); + // Preformatted div + content = Regex.Replace(content, "```+(?:[^`]*?\\n)?([^`]+)\\n?```+", + m => "