Details
-
Type: Task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 3.6
-
Component/s: Documentation
-
Labels:None
-
Number of attachments :
Description
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:
@When("the {item|} {price|cost} is $price")
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:
@When("the {item |}{price|cost} is $price")
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!
Activity
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 3.6.3 [ 18417 ] | |
Resolution | Fixed [ 1 ] |
Issue Type | Bug [ 1 ] | Task [ 3 ] |
Fix Version/s | 3.7 [ 18390 ] |