Skip to content

Commit

Permalink
Adding activation event for VB.NET, closes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-bond committed Jan 4, 2018
1 parent 0a77f81 commit 45199a9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Change Log

## [1.1.4] (2018-01-04)
#### Features
* Adding activation event and new comment type for VB.NET ("vb") ([]()), closes [21]

## [1.1.3] (2017-12-22)
#### Bug Fixes
#### Features
* Adding activation event for React ("javascriptreact") ([e54ae83](https:/aaron-bond/better-comments/commit/e54ae83)), closes [#19]

## [1.1.2] (2017-12-16)
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Better Comments",
"icon": "icon.png",
"description": "Improve your code commenting by annotating with alert, informational, TODOs, and more!",
"version": "1.1.3",
"version": "1.1.4",
"publisher": "aaron-bond",
"author": {
"name": "Aaron Bond"
Expand Down Expand Up @@ -53,7 +53,8 @@
"onLanguage:r",
"onLanguage:ruby",
"onLanguage:shellscript",
"onLanguage:sql"
"onLanguage:sql",
"onLanguage:vb"
],
"galleryBanner": {
"color": "#e3f4ff",
Expand Down
9 changes: 6 additions & 3 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class Parser {
characters.push(commentTag.escapedTag);
}

// start by finding the delimiter (//, --, #) with an optional space
// start by finding the delimiter (//, --, #, ') with an optional space
this.expression = "(" + this.delimiter.replace(/\//ig, "\\/") + ")+( )?";

// Apply all configurable comment start tags
Expand Down Expand Up @@ -129,7 +129,7 @@ export class Parser {
}

/**
* Sets the comment delimiter [//, #, --] of a given language
* Sets the comment delimiter [//, #, --, '] of a given language
* @param languageCode The short code of the current language
* https://code.visualstudio.com/docs/languages/identifiers
*/
Expand Down Expand Up @@ -169,6 +169,9 @@ export class Parser {
case "lua":
this.delimiter = "--";
break;

case "vb":
this.delimiter = "'";
}
}

Expand All @@ -185,7 +188,7 @@ export class Parser {
let escapedSequence = item.tag.replace(/([()[{*+.$^\\|?])/g, '\\$1');
this.tags.push({
tag: item.tag,
escapedTag: escapedSequence.replace(/\//gi, "\\/"), //! hardcoded to escape slashes
escapedTag: escapedSequence.replace(/\//gi, "\\/"), // ! hardcoded to escape slashes
ranges: [],
decoration: vscode.window.createTextEditorDecorationType(options)
});
Expand Down

0 comments on commit 45199a9

Please sign in to comment.