mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-23 03:06:53 -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; }
|
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;
|
background-color: #2F3136;
|
||||||
font-family: Consolas, Courier New, Courier, Monospace;
|
font-family: Consolas, Courier New, Courier, Monospace;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
|
|
|
@ -12,7 +12,13 @@ a {
|
||||||
|
|
||||||
a:hover { text-decoration: underline; }
|
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;
|
background-color: #F9F9F9;
|
||||||
font-family: Consolas, Courier New, Courier, Monospace;
|
font-family: Consolas, Courier New, Courier, Monospace;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
|
|
|
@ -174,7 +174,7 @@ namespace DiscordChatExporter.Services
|
||||||
|
|
||||||
// Preformatted multiline
|
// Preformatted multiline
|
||||||
content = Regex.Replace(content, "```([^`]*?)```",
|
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
|
// Preformatted inline
|
||||||
content = Regex.Replace(content, "`([^`]*?)`",
|
content = Regex.Replace(content, "`([^`]*?)`",
|
||||||
|
@ -193,7 +193,7 @@ namespace DiscordChatExporter.Services
|
||||||
content = Regex.Replace(content, "~~([^~]*?)~~", "<s>$1</s>");
|
content = Regex.Replace(content, "~~([^~]*?)~~", "<s>$1</s>");
|
||||||
|
|
||||||
// New lines
|
// New lines
|
||||||
content = content.Replace("\n", "</br>");
|
content = content.Replace("\n", "<br />");
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue