Pārlūkot izejas kodu

Add small delay for the syntax highlighting

simov 9 gadi atpakaļ
vecāks
revīzija
9991695133
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      content/content.js

+ 1 - 1
content/content.js

@@ -64,7 +64,7 @@ window.addEventListener('DOMContentLoaded', () => {
         html: (element, initialized, context) => {
         html: (element, initialized, context) => {
           if (!initialized) {
           if (!initialized) {
             document.body.scrollTop = parseInt(localStorage.getItem('scrolltop'))
             document.body.scrollTop = parseInt(localStorage.getItem('scrolltop'))
-            Prism.highlightAll()
+            setTimeout(() => Prism.highlightAll(), 20)
           }
           }
         }
         }
       }
       }