Daniel Schneller created JBEHAVE-765:
----------------------------------------
Summary: Variants documentation is misleading wrt whitespace
Key: JBEHAVE-765
URL: https://jira.codehaus.org/browse/JBEHAVE-765
Project: JBehave
Issue Type: Bug
Components: Documentation
Affects Versions: 3.6
Reporter: Daniel Schneller
Priority: Minor
On the pattern variants documentation page
http://jbehave.org/reference/stable/pattern-variants.html the example is
misleading regarding whitespace placement for optional expressions. The example
currently reads:
{code}
@When("the {item|} {price|cost} is $price")
{code}
Notice the white space between `{item|}` and `{price|...}`. The intention is to
show optional parts in the expression. However, in this form leaving out the
word `item` would require two consecutive spaces for the step to be identified
(one after "the" and one before "price").
The example should read:
{code}
@When("the {item |}{price|cost} is $price")
{code}
and maybe include a note in the text below it:
Notice that the word "item" becomes effectively optional in this example.
However, make sure to include the space following it in the variant to prevent
the resulting step from containing multiple consecutive spaces!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.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