annotations.add(curLine);
// System.out.println(curLine);
// Initial settings for matching lines
- // "\*/( |\t)*$"
- Pattern regexpEnd = Pattern.compile("\\*/( |\\t)*$");
+ // "\*/\s*$"
+ Pattern regexpEnd = Pattern.compile("\\*/\\s*$");
Matcher matcher = regexpEnd.matcher(curLine);
- if (matcher.find()) { // The beginning line is also the end line
- annotations.add(curLine);
+ if (matcher.find()) {
+ // The beginning line is also the end line
+ // In this case, we have already add the curLine
return annotations;
} else {
try {