[ 
http://jira.codehaus.org/browse/JBEHAVE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=206973#action_206973
 ] 

Jonathan Ross commented on JBEHAVE-163:
---------------------------------------

Unfortunately, if the step preceding the comment ends with a variable, the 
pattern matcher gets greedy...

I would also like to be able to use comments between steps, and the only 
work-around I have currently is to avoid ending a step annotation with a 
variable - this doesn't always lead to natural prose!

Some solutions I can come up with:
1. add a commas or period followed by a new line to the syntax as step 
delimiters, e.g.
    Given a comma or period after a $variable,
    i can put a comment here without it being swallowed by the pattern matcher,
    And i can proceed with the scenario.
2. provide regexp support in the step annotations, e.g.:
    @Before("Given a step matching a variable at the end, like so: $([^\n]*)")
3. provide another mechanism for distinguishing between single and multi-line 
variables
4. add comment prefixes as suggested by the original post


> Support comments in plain-text scenarios
> ----------------------------------------
>
>                 Key: JBEHAVE-163
>                 URL: http://jira.codehaus.org/browse/JBEHAVE-163
>             Project: JBehave
>          Issue Type: New Feature
>    Affects Versions: 2.2
>            Reporter: Douglas Padian
>            Priority: Minor
>             Fix For: 2.5
>
>
> It would be nice to have the ability to add comments in the plain-test 
> scenarios.  If we add any comments, the parser thinks they are the 
> continuation of the previous line.  To have comment support so that all lines 
> preceded by # or -- or whatever get ignored, that would be a nice feature.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to