mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
Slightly more robust syntax highlighting
This commit is contained in:
parent
dd6d2223a5
commit
e4412f0634
|
|
@ -249,6 +249,7 @@ function doSyntaxHighlighting() {
|
||||||
if (messageBodies.length > 0) {
|
if (messageBodies.length > 0) {
|
||||||
observer.disconnect();
|
observer.disconnect();
|
||||||
|
|
||||||
|
try {
|
||||||
let hasSeenVisible = false;
|
let hasSeenVisible = false;
|
||||||
|
|
||||||
// Go from last message to first
|
// Go from last message to first
|
||||||
|
|
@ -286,9 +287,12 @@ function doSyntaxHighlighting() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
|
||||||
observer.observe(targetElement, config);
|
observer.observe(targetElement, config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
// Add some scrollbars
|
// Add some scrollbars
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue