Skip to content

Commit c2a846f

Browse files
skip autocomplete in strings
1 parent 33cb201 commit c2a846f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Gruntfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ module.exports = function(grunt) {
119119
uglify: {
120120
options: {
121121
wrap: "terminal",
122-
onlyASCII: true,
123122
maxLineLen: 5000,
124123
ASCIIOnly: true
125124
},

webSource/js/TerminalAutocomplete.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ TerminalAutocomplete.prototype.getEndings = function (string) {
143143

144144
string = string.substr(string.length - MAX_LENGTH, MAX_LENGTH);
145145

146+
// skip strings
147+
if ((string.match(/"/g) || []).length % 2 === 1) return [];
148+
146149
for (i in this.TYPES) {
147150
matcher = this.TYPES[i].regExp || this.TYPES.common.regExp;
148151
trieString = (string.match(matcher) || []).slice(1).join("\n");

0 commit comments

Comments
 (0)