Skip to content

Commit

Permalink
fix: line comment block matching
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinhuish committed Dec 6, 2024
1 parent ce7bf2c commit 5f9dfc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"publisher": "edwinhuish",
"name": "better-comments-next",
"displayName": "Better Comments Next",
"version": "3.3.6",
"version": "3.3.7",
"description": "Improve your code commenting by annotating with alert, informational, TODOs, and more!",
"author": {
"name": "Edwin Xu"
Expand Down
2 changes: 1 addition & 1 deletion src/handler/langs/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export async function pickLineCommentDecorationOptions({ editor, processed = []

const escapedMarks = comments.lineComments.map((s) => `${escapeRegexString(s)}+`).join('|');

const blockExp = new RegExp(`(${escapedMarks}).*?(?:\\n[ \\t]*\\1.*?)*[\\n$]`, 'g');
const blockExp = new RegExp(`(${escapedMarks}).*?(?:\\n[ \\t]*\\1.*?)*(\\n|$)`, 'g');

const multilineTags = configs.tags.filter((t) => t.multiline).map((tag) => tag.tagEscaped);
const lineTags = configs.tags.filter((t) => !t.multiline).map((tag) => tag.tagEscaped);
Expand Down

0 comments on commit 5f9dfc6

Please sign in to comment.