Skip to content

Commit 9403834

Browse files
committed
JS: Include leading star in parsed source
1 parent 9b4bdae commit 9403834

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascript/extractor/src/com/semmle/js/parser/JSDocParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class JSDocParser {
3939

4040
/** Parse the given string as a JSDoc comment. */
4141
public JSDocComment parse(Comment comment) {
42-
source = comment.getText().substring(1);
42+
source = comment.getText();
4343
JSDocTagParser p = new JSDocTagParser();
4444
Pair<String, List<JSDocTagParser.Tag>> r = p.new TagParser(null).parse(source);
4545
List<JSDocTag> tags = new ArrayList<>();
@@ -1869,9 +1869,9 @@ public Pair<String, List<Tag>> parse(String comment) {
18691869
source = comment;
18701870

18711871
length = source.length();
1872-
index = 0;
1872+
index = 1; // Skip initial "*"
18731873
lineNumber = 0;
1874-
lineStart = 0;
1874+
lineStart = 1; // Skip initial "*"
18751875
recoverable = true;
18761876
sloppy = true;
18771877

0 commit comments

Comments
 (0)