From a5fc5870c99e1249457d26cd2238bcc42f620220 Mon Sep 17 00:00:00 2001 From: Herrington Darkholme Date: Fri, 23 Jun 2017 14:52:57 +0800 Subject: [PATCH] fix #263: preserve eslint error line (#264) --- server/src/modes/template/services/htmlValidation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/modes/template/services/htmlValidation.ts b/server/src/modes/template/services/htmlValidation.ts index 7d989cd15b..87dc1def8f 100644 --- a/server/src/modes/template/services/htmlValidation.ts +++ b/server/src/modes/template/services/htmlValidation.ts @@ -17,8 +17,8 @@ function toDiagnostic(error: ESLintError): Diagnostic { export function doValidation(document: TextDocument, engine: CLIEngine): Diagnostic[] { const text = document.getText() - .replace(/^\s{10}/, ''); + .replace(/ {10}/, ''); // TODO: replace the last 11 consecutive spaces const report = engine.executeOnText(text, document.uri); return report.results[0]