Skip to content

Commit

Permalink
fix #263: preserve eslint error line (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerringtonDarkholme authored Jun 23, 2017
1 parent 5ab4970 commit a5fc587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/modes/template/services/htmlValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function toDiagnostic(error: ESLintError): Diagnostic {

export function doValidation(document: TextDocument, engine: CLIEngine): Diagnostic[] {
const text = document.getText()
.replace(/^\s{10}/, '<template>')
.replace(/\s{11}$/, '</template>');
.replace(/ {10}/, '<template>')
.replace(/\s{11}$/, '</template>'); // TODO: replace the last 11 consecutive spaces
const report = engine.executeOnText(text, document.uri);

return report.results[0]
Expand Down

0 comments on commit a5fc587

Please sign in to comment.