Skip to content

Commit

Permalink
Fix code blocks in instruct mode
Browse files Browse the repository at this point in the history
  • Loading branch information
oobabooga committed Oct 11, 2023
1 parent 773c17f commit faf5c4d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
7 changes: 5 additions & 2 deletions css/html_instruct_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
.message-body p {
font-size: 15px !important;
line-height: 22px !important;
margin-bottom: 1.25em !important;
}

.chat .message-body ul, .chat .message-body ol {
.message-body p, .chat .message-body ul, .chat .message-body ol {
margin-bottom: 1.25em !important;
}

.message-body p:last-child, .chat .message-body ul:last-child, .chat .message-body ol:last-child {
margin-bottom: 0em !important;
}

.dark .message-body p em {
color: rgb(198, 202, 214) !important;
}
Expand Down
16 changes: 15 additions & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,27 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
list-style-type: disc !important;
}

.message-body pre {
.message-body pre:not(:last-child) {
margin-bottom: 1.25em !important;
}

.message-body pre:last-child {
margin-bottom: 0px !important;
}

.message-body code {
white-space: pre-wrap !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 {
Expand Down

0 comments on commit faf5c4d

Please sign in to comment.