diff --git a/DiscordChatExporter/Resources/ExportService/DarkTheme.css b/DiscordChatExporter/Resources/ExportService/DarkTheme.css index c53e302..e5e2000 100644 --- a/DiscordChatExporter/Resources/ExportService/DarkTheme.css +++ b/DiscordChatExporter/Resources/ExportService/DarkTheme.css @@ -12,7 +12,13 @@ a { a:hover { text-decoration: underline; } -div.pre, span.pre { +div.pre { + background-color: #2F3136; + font-family: Consolas, Courier New, Courier, Monospace; + padding: 8px; +} + +span.pre { background-color: #2F3136; font-family: Consolas, Courier New, Courier, Monospace; padding-left: 2px; diff --git a/DiscordChatExporter/Resources/ExportService/LightTheme.css b/DiscordChatExporter/Resources/ExportService/LightTheme.css index 4d5ca43..922789e 100644 --- a/DiscordChatExporter/Resources/ExportService/LightTheme.css +++ b/DiscordChatExporter/Resources/ExportService/LightTheme.css @@ -12,7 +12,13 @@ a { a:hover { text-decoration: underline; } -div.pre, span.pre { +div.pre { + background-color: #F9F9F9; + font-family: Consolas, Courier New, Courier, Monospace; + padding: 8px; +} + +span.pre { background-color: #F9F9F9; font-family: Consolas, Courier New, Courier, Monospace; padding-left: 2px; diff --git a/DiscordChatExporter/Services/ExportService.cs b/DiscordChatExporter/Services/ExportService.cs index 633a023..23be998 100644 --- a/DiscordChatExporter/Services/ExportService.cs +++ b/DiscordChatExporter/Services/ExportService.cs @@ -174,7 +174,7 @@ namespace DiscordChatExporter.Services // Preformatted multiline content = Regex.Replace(content, "```([^`]*?)```", - m => "
" + m.Groups[1].Value + "
"); + m => "
" + m.Groups[1].Value.Trim('\n') + "
"); // Preformatted inline content = Regex.Replace(content, "`([^`]*?)`", @@ -193,7 +193,7 @@ namespace DiscordChatExporter.Services content = Regex.Replace(content, "~~([^~]*?)~~", "$1"); // New lines - content = content.Replace("\n", "
"); + content = content.Replace("\n", "
"); return content; }