From b8121e2068e583651d74749a6d9fcbc09872a817 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Wed, 1 Mar 2017 16:17:05 +0100 Subject: [PATCH] Improve Mark display on compact mode --- lib/js-yaml/mark.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) {