Skip to content

Commit 11c269d

Browse files
authored
Fix JAVA regex for multi-line comment (#58 #60) (#61)
1 parent 807f921 commit 11c269d

6 files changed

Lines changed: 23 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.8.10
2+
- Fix JAVA regex string for matching multi-line comments (related issues: #58, #60).
3+
14
## 1.8.9
25
- Fix issue 52: marker must be at the beginning of a string.
36

1020 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-todo-parser",
33
"displayName": "TODO Parser",
44
"description": "Parse TODOs in your working files.",
5-
"version": "1.8.9",
5+
"version": "1.8.10",
66
"publisher": "minhthai",
77
"engines": {
88
"vscode": "^1.2.0"

src/const/RegexStrings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const RG_JAVA = "/\\*([\\s\\S]*?)\\*/|//([^\\r\\n]+)";
1+
export const RG_JAVA = "/\\*+([\\s\\S]*?)\\*/|//([^\\r\\n]+)";
22
export const RG_PYTHON = "#\\s*(.+)";
33
export const RG_ADA = "--\\s*(.+)";
44
export const RG_FSHARP = "\\(\\*([\\s\\S]*?)\\*\\)|//([^\\r\\n]+)";

test/samples/javascript.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
let x = 5;
1+
let x = 5;
2+
3+
/**
4+
* @todo: Write the documentation.
5+
* @todo: Implement this function.
6+
*/
7+
/*
8+
* TODO: this todo also
9+
* an asterisk
10+
*/
11+
// TODO: another
12+
// Note: test
13+
function foo() {
14+
// write me
15+
}

test/samples/php.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
echo 'This is a test'; // TODO: one line todo
33
/* TODO: this is a
44
multiline todo */
5+
/**
6+
* TODO To do description
7+
*/
58
echo 'This is yet another test';
69
echo 'One Final Test'; # TODO: another one line todo
710

0 commit comments

Comments
 (0)