Skip to content

Commit f303d38

Browse files
committed
fix: review
1 parent 3f22c2f commit f303d38

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/utils/monaco/highlightErrors.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,17 @@ function highlightErrors() {
2727
return;
2828
}
2929

30-
const markers = errors.map((error): editor.IMarkerData => {
31-
const markerColumn = error.startColumn + 1;
32-
return {
30+
const markers = errors.map(
31+
(error): editor.IMarkerData => ({
3332
message: i18n('context_syntax-error'),
3433
source: error.message,
3534
severity: MarkerSeverity.Error,
3635
startLineNumber: error.startLine,
37-
startColumn: markerColumn,
36+
startColumn: error.startColumn + 1,
3837
endLineNumber: error.endLine,
39-
endColumn: markerColumn,
40-
};
41-
});
38+
endColumn: error.endColumn + 1,
39+
}),
40+
);
4241
editor.setModelMarkers(model, owner, markers);
4342
}
4443

0 commit comments

Comments
 (0)