diff --git a/lib/js-yaml/mark.js b/lib/js-yaml/mark.js index 47b265c2..534088af 100644 --- a/lib/js-yaml/mark.js +++ b/lib/js-yaml/mark.js @@ -59,9 +59,10 @@ Mark.prototype.toString = function toString(compact) { where += 'in "' + this.name + '" '; } - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); - - if (!compact) { + if (compact) { + where += '(' + (this.line + 1) + ':' + (this.column + 1) + ')'; + } else { + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); snippet = this.getSnippet(); if (snippet) {