Slightly more robust syntax highlighting

This commit is contained in:
oobabooga 2025-09-17 21:57:17 -07:00
parent dd6d2223a5
commit e4412f0634

View file

@ -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