Explorar o código

Fixes an endless loop when styling code blocks with a bad format

ubermanu %!s(int64=4) %!d(string=hai) anos
pai
achega
649e813ee8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/shared/styling.js

+ 1 - 1
src/shared/styling.js

@@ -124,7 +124,7 @@ function getDirectiveLength (d, text, i) {
         return 0;
     } else {
         const substring = text.slice(i+1);
-        let j;
+        let j = 0;
         let idx = substring.indexOf(d);
         while (idx !== -1) {
             if (isDirectiveEnd(d, i+1+idx, text)) return idx+1+2*d.length;