JBehave
  1. JBehave
  2. JBEHAVE-765

Variants documentation is misleading wrt whitespace

    Details

    • Type: Task Task
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 3.6.3, 3.7
    • Component/s: Documentation
    • Labels:
      None
    • Number of attachments :
      0

      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

        Mauro Talevi made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.6.3 [ 18417 ]
        Resolution Fixed [ 1 ]
        Mauro Talevi made changes -
        Issue Type Bug [ 1 ] Task [ 3 ]
        Mauro Talevi made changes -
        Fix Version/s 3.7 [ 18390 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Daniel Schneller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: