forked from open-webui/open-webui
fix: code render issue
This commit is contained in:
parent
fed6a5b173
commit
affa6568d6
2 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,7 @@ html {
|
||||||
|
|
||||||
code {
|
code {
|
||||||
/* white-space-collapse: preserve !important; */
|
/* white-space-collapse: preserve !important; */
|
||||||
white-space: pre;
|
overflow-x: auto;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
let code = block.querySelector('code');
|
let code = block.querySelector('code');
|
||||||
code.style.borderTopRightRadius = 0;
|
code.style.borderTopRightRadius = 0;
|
||||||
code.style.borderTopLeftRadius = 0;
|
code.style.borderTopLeftRadius = 0;
|
||||||
|
code.style.whiteSpace = 'pre';
|
||||||
|
|
||||||
let topBarDiv = document.createElement('div');
|
let topBarDiv = document.createElement('div');
|
||||||
topBarDiv.style.backgroundColor = '#202123';
|
topBarDiv.style.backgroundColor = '#202123';
|
||||||
|
|
Loading…
Reference in a new issue