Fix code blocks in instruct mode

This commit is contained in:
oobabooga 2023-10-11 12:18:46 -07:00
parent 773c17faec
commit faf5c4dd58
2 changed files with 20 additions and 3 deletions

View File

@ -14,11 +14,14 @@
.message-body p { .message-body p {
font-size: 15px !important; font-size: 15px !important;
line-height: 22px !important; line-height: 22px !important;
}
.message-body p, .chat .message-body ul, .chat .message-body ol {
margin-bottom: 1.25em !important; margin-bottom: 1.25em !important;
} }
.chat .message-body ul, .chat .message-body ol { .message-body p:last-child, .chat .message-body ul:last-child, .chat .message-body ol:last-child {
margin-bottom: 1.25em !important; margin-bottom: 0em !important;
} }
.dark .message-body p em { .dark .message-body p em {

View File

@ -381,13 +381,27 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
list-style-type: disc !important; list-style-type: disc !important;
} }
.message-body pre { .message-body pre:not(:last-child) {
margin-bottom: 1.25em !important; margin-bottom: 1.25em !important;
} }
.message-body pre:last-child {
margin-bottom: 0px !important;
}
.message-body code { .message-body code {
white-space: pre-wrap !important; white-space: pre-wrap !important;
word-wrap: break-word !important; word-wrap: break-word !important;
border: 1px solid var(--border-color-primary);
border-radius: var(--radius-sm);
background: var(--background-fill-secondary);
font-size: 85%;
padding: 1px 3px;
}
.message-body pre > code {
display: block;
padding: .5em .7em;
} }
.message-body :not(pre) > code { .message-body :not(pre) > code {