diff --git a/package.json b/package.json index 1bc0799..db57ce1 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/decorator.ts b/src/decorator.ts index 88217fd..b392c5b 100644 --- a/src/decorator.ts +++ b/src/decorator.ts @@ -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);