Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dotnet/CucumberExpressions/CucumberExpressionException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal static CucumberExpressionException CreateAlternationNotAllowedInOptiona
expression,
PointAt(current),
"An alternation can not be used inside an optional",
"You can use '\\/' to escape the '/'"
"If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead."
));
}

Expand Down
2 changes: 1 addition & 1 deletion go/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func createAlternationNotAllowedInOptional(expression string, current token) err
expression,
pointAtToken(current),
"An alternation can not be used inside an optional",
"You can use '\\/' to escape the '/'",
"If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead.",
))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static CucumberExpressionException createAlternationNotAllowedInOptional(String
expression,
pointAt(current),
"An alternation can not be used inside an optional",
"You can use '\\/' to escape the '/'"
"If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead."
));
}

Expand Down
2 changes: 1 addition & 1 deletion javascript/src/Errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function createAlternationNotAllowedInOptional(expression: string, curren
expression,
pointAtLocated(current),
'An alternation can not be used inside an optional',
"You can use '\\/' to escape the '/'"
"If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead."
)
)
}
Expand Down
5 changes: 4 additions & 1 deletion python/cucumber_expressions/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ def __init__(self, expression: str, current):
expression=expression,
pointer=point_at_located(current),
problem="An alternation can not be used inside an optional",
solution="You can use '\\/' to escape the '/'",
solution=(
"If you did not mean to use an alternation you can use '\\/' to escape the '/'. "
"Otherwise rephrase your expression or consider using a regular expression instead."
),
)
)

Expand Down
2 changes: 1 addition & 1 deletion ruby/lib/cucumber/cucumber_expressions/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def initialize(expression, current)
expression,
point_at_located(current),
'An alternation can not be used inside an optional',
"You can use '\\/' to escape the '/'"
"If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead."
)
)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ exception: |-
three( brown/black) mice
^
An alternation can not be used inside an optional.
You can use '\/' to escape the '/'
If you did not mean to use an alternation you can use '\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead.