Merge pull request #334 from ollama-webui/code-render-fix

fix: code render issue
This commit is contained in:
Timothy Jaeryang Baek 2024-01-01 13:37:18 -05:00 committed by GitHub
commit b42050fec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,7 @@ html {
code {
/* white-space-collapse: preserve !important; */
white-space: pre;
overflow-x: auto;
width: auto;
}

View File

@ -88,6 +88,7 @@
let code = block.querySelector('code');
code.style.borderTopRightRadius = 0;
code.style.borderTopLeftRadius = 0;
code.style.whiteSpace = 'pre';
let topBarDiv = document.createElement('div');
topBarDiv.style.backgroundColor = '#202123';