npm package diff

Package: yaml

Versions: 2.2.1 - 2.2.2

File: package/browser/dist/errors.js

Index: package/browser/dist/errors.js
===================================================================
--- package/browser/dist/errors.js
+++ package/browser/dist/errors.js
@@ -46,9 +46,9 @@
     if (/[^ ]/.test(lineStr)) {
         let count = 1;
         const end = error.linePos[1];
         if (end && end.line === line && end.col > col) {
-            count = Math.min(end.col - col, 80 - ci);
+            count = Math.max(1, Math.min(end.col - col, 80 - ci));
         }
         const pointer = ' '.repeat(ci) + '^'.repeat(count);
         error.message += `:\n\n${lineStr}\n${pointer}\n`;
     }