Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
fix word detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ImUrX committed Mar 3, 2021
1 parent a031e9e commit b48e955
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
"end": "^\\s*\\)\\b"
}
},
"wordPattern": "(-?\\d*\\.\\d+)|([^\\~\\:\\+\\-\\!\\^\\*\/\\%\\=\\<\\>\\&\\|\\;\\,\\(\\)\\'\\[\\]\\{\\}]+)",
"wordPattern": "(-?\\d*\\.\\d+)|([^~:+\\-!^*/%=<>&|;,()'[\\]{}\\s]+)",
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"bugs": {
"url": "https://github.com/ImUrX/vscode-scarpet/issues"
},
"version": "0.1.9",
"version": "0.1.10",
"engines": {
"vscode": "^1.43.0"
},
Expand Down
5 changes: 1 addition & 4 deletions src/completionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ export default class ScarpetCompletionItemProvider
const results: vscode.CompletionItem[] = [],
text = document.lineAt(position.line).text;

if (
position.character <= 0 ||
this.isInsideStringOrComment(document, position)
) {
if (position.character <= 0 || this.isInsideStringOrComment(document, position)) {
return Promise.resolve(results);
}

Expand Down

0 comments on commit b48e955

Please sign in to comment.