mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-22 10:55:15 -04:00
Fix div.pre output styling
This commit is contained in:
parent
a556926fe6
commit
b110413c08
3 changed files with 16 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue