mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-03 00:29:20 +00:00
Fix div.pre output styling
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace DiscordChatExporter.Services
|
||||
|
||||
// Preformatted multiline
|
||||
content = Regex.Replace(content, "```([^`]*?)```",
|
||||
m => "<div class=\"pre\">" + m.Groups[1].Value + "</div>");
|
||||
m => "<div class=\"pre\">" + m.Groups[1].Value.Trim('\n') + "</div>");
|
||||
|
||||
// Preformatted inline
|
||||
content = Regex.Replace(content, "`([^`]*?)`",
|
||||
@@ -193,7 +193,7 @@ namespace DiscordChatExporter.Services
|
||||
content = Regex.Replace(content, "~~([^~]*?)~~", "<s>$1</s>");
|
||||
|
||||
// New lines
|
||||
content = content.Replace("\n", "</br>");
|
||||
content = content.Replace("\n", "<br />");
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user