Skip to content

Commit

Permalink
忽略纯空格
Browse files Browse the repository at this point in the history
  • Loading branch information
xucl authored and xucl committed Jul 5, 2018
1 parent a84c9f9 commit 43bca03
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function activate(context) {
}
try {
var text = activeEditor.document.getText();
var word = activeEditor.document.getText(activeEditor.selection);
var word = (activeEditor.document.getText(activeEditor.selection) || "").trim();
word = word.replace(/[\W_]/g, "\\$&"); //在特殊字元前面加上 “\\” thanks harlen
//console.log("1word:"+word);
var mathes = {}, match;
Expand Down
Binary file not shown.
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": "highlight-icemode",
"displayName": "highlight-icemode",
"description": "Highlight all selected occurrences of words. (border mode)",
"version": "0.0.8",
"version": "0.0.9",
"publisher": "iceliu",
"icon": "images/icon.png",
"engines": {
Expand Down

0 comments on commit 43bca03

Please sign in to comment.