浏览代码

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

ubermanu 4 年之前
父节点
当前提交
649e813ee8
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;