Skip to content

Commit

Permalink
a potential fix to #63
Browse files Browse the repository at this point in the history
  • Loading branch information
moalamri committed Oct 11, 2022
1 parent 29481a8 commit 01aae07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Inline fold",
"description": "A custom decorator that \"fold\" matching content in single line",
"icon": "res/icon.png",
"version": "0.1.9",
"version": "0.1.10",
"publisher": "moalamri",
"homepage": "https://github.com/moalamri/vscode-inline-fold",
"bugs": "https://github.com/moalamri/vscode-inline-fold/issues",
Expand Down
2 changes: 2 additions & 0 deletions src/decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ export class Decorator {
let match;
while (match = regEx.exec(text)) {

if(match && !match[regexGroup]) continue;

const matched = match[regexGroup];
const foldIndex = match[0].lastIndexOf(matched);
const startPosition = this.startPositionLine(match.index, foldIndex);
Expand Down

0 comments on commit 01aae07

Please sign in to comment.