Yes, we can add a configurable option to ignore white space.  

> On 2 Nov 2016, at 15:40, Hank R. <[email protected]> wrote:
> 
> Hi Mauro,
> 
> It would be unusual if @When and @Then annotations relied on whitespace being 
> significant, and I would personally discourage it, but it is possible that 
> other users' stories will break -- that's what I mean by backwards 
> compatibility.
> 
> I will note that in the ticket, 
> 
> Thank you,
> Hank
> 
>> On Tuesday, November 1, 2016 at 4:51:53 PM UTC-7, mauro.talevi wrote:
>> Hi, 
>> 
>> you are right that better normalisation of whitespace would be useful. 
>> 
>> Feel free to create a JIRA issue with a patch for this. 
>> 
>> Not sure what you mean by a global property for backward compatibility.   
>> 
>> Cheers
>> 
>>> On 1 Nov 2016, at 22:13, Hank R. <[email protected]> wrote:
>>> 
>>> Hello, 
>>> 
>>> I hoped to use patterns to provide some flexibility to our project managers 
>>> that would allow them to use first or second person, or none at all. For 
>>> example:
>>> 
>>> When the user clicks the button
>>> Then you click the button
>>> Then click the button
>>> 
>>> I wanted for all of the above to match the same class:
>>> 
>>> @Step
>>> @When("{you|the user|} click{s|} the button")
>>> @Then("{you|the user|} click{s|} the button")
>>> public void ClickTheButton() {
>>> }
>>> 
>>> What I discovered is that leading whitespace is significant, so the above 
>>> would never match "Then click the button" but would match "Then you click 
>>> the button"
>>> 
>>> I don't see a use case for whitespace being significant and assumed it was 
>>> normalized -- leading and trailing whitespace removed and all other 
>>> whitespace reduced to a single space character.
>>> 
>>> At this point maybe only a global property would provide backward 
>>> compatibility. 
>>> 
>>> Any thoughts? 
>>> 
>>> Thank you,
>>> Hank
>>> 
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "JBehave User" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web, visit 
>>> https://groups.google.com/d/msgid/jbehave-user/c002eae6-7e76-4ce7-bf5e-3f18fde0560d%40googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/995e72db-10a8-4540-bb5b-b1596f552b48%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/E6416AE2-07C4-4FB3-BC9F-25A6ABB64DD1%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to