Explorar el Código

Suppressed highlighting errors

n1474335 hace 5 años
padre
commit
f864a5f31e
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      src/core/Chef.mjs

+ 6 - 1
src/core/Chef.mjs

@@ -146,7 +146,12 @@ class Chef {
             const func = direction === "forward" ? highlights[i].f : highlights[i].b;
 
             if (typeof func == "function") {
-                pos = func(pos, highlights[i].args);
+                try {
+                    pos = func(pos, highlights[i].args);
+                } catch (err) {
+                    // Throw away highlighting errors
+                    pos = [];
+                }
             }
         }