Forráskód Böngészése

HUE-4031 [editor] Improve token marking based on error location

Johan Ahlen 8 éve
szülő
commit
404adeb867

+ 1 - 5
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3592,11 +3592,7 @@
             if (hueDebug.showSyntaxParseResult) {
               console.log(e.data.syntaxError);
             }
-            var token = self.editor.session.getTokenAt(e.data.syntaxError.loc.first_line - 1, e.data.syntaxError.loc.first_column);
-            if (token && token.value && /`$/.test(token.value)) {
-              // Ace getTokenAt() thinks the first ` is a token, column +1 will include the first and last.
-              token = self.editor.session.getTokenAt(e.data.syntaxError.loc.first_line - 1, e.data.syntaxError.loc.first_column + 1);
-            }
+            var token = self.editor.session.getTokenAt(e.data.syntaxError.loc.first_line - 1, e.data.syntaxError.loc.first_column + 1);
             token.syntaxError = e.data.syntaxError;
             var AceRange = ace.require('ace/range').Range;
             var range = new AceRange(e.data.syntaxError.loc.first_line - 1, e.data.syntaxError.loc.first_column, e.data.syntaxError.loc.last_line - 1, e.data.syntaxError.loc.first_column + e.data.syntaxError.text.length);