Skip to content

Commit

Permalink
fix #14
Browse files Browse the repository at this point in the history
  • Loading branch information
hchiam committed Jul 23, 2019
1 parent 112d5c1 commit c8383f8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Install it on VS Code: https://marketplace.visualstudio.com/items?itemName=hchia
BEGIN
-- comment: sp_password
```
- `Number(someID)` would evaluate to 0 if someID is empty.
- `Number(someID)` would evaluate to 0 if someID is empty (e.g. Number('') -> 0).

## Future work / Suggestions:

Expand Down
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 @@ -2,7 +2,7 @@
"name": "custom-vscode-linter",
"displayName": "custom-vscode-linter",
"description": "Custom VSCode Linter!",
"version": "0.6.0",
"version": "0.6.1",
"publisher": "hchiam",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ export function activate(context: vscode.ExtensionContext) {
}

function check_numberOfId(rangesToDecorate: vscode.DecorationOptions[]) {
let regex = /Number\((.+)?I(d|D)\)/g;
let hoverMessage = 'If ${match[1]} is an ID but is empty, then Number(${match[1]}) evaluates to 0.';
let popupMessage = 'Number(${match[1]}) evaluates to 0 if ID is empty.';
let regex = /Number\((.+?I(d|D))\)/g;
let hoverMessage = 'If ${match[1]} is an ID but is empty, then Number(${match[1]}) evaluates to 0 (e.g. Number("") -> 0).';
let popupMessage = 'Number(someId) evaluates to 0 if someId is empty (e.g. "").';
genericCheck(regex, hoverMessage, popupMessage, rangesToDecorate);
}

Expand Down

0 comments on commit c8383f8

Please sign in to comment.