commit 1417d4547f332ab0ac90793f0668987ecabaa9f9 Author: Mauro Talevi <mauro.tal...@aquilonia.org> AuthorDate: Sun, 18 May 2014 12:02:33 +0200 Commit: Mauro Talevi <mauro.tal...@aquilonia.org> CommitDate: Sun, 18 May 2014 12:02:33 +0200
JBEHAVE-1016: Ensure comments are recognised as such only if there is a space after the keyword. diff --git a/org.jbehave.eclipse/src/org/jbehave/eclipse/parser/RegexUtils.java b/org.jbehave.eclipse/src/org/jbehave/eclipse/parser/RegexUtils.java index a4e5932..76b26fd 100644 --- a/org.jbehave.eclipse/src/org/jbehave/eclipse/parser/RegexUtils.java +++ b/org.jbehave.eclipse/src/org/jbehave/eclipse/parser/RegexUtils.java @@ -39,7 +39,7 @@ public class RegexUtils { } } - public static Pattern COMMENT_PATTERN = Pattern.compile("^\\s*!--[^\r\n]*[\r\n]{0,2}", Pattern.MULTILINE); + public static Pattern COMMENT_PATTERN = Pattern.compile("^\\s*!--\\s[^\r\n]*[\r\n]{0,2}", Pattern.MULTILINE); public static String removeComment(String input) { return COMMENT_PATTERN.matcher(input).replaceAll(""); }