Skip to content

Commit f8334bc

Browse files
committed
closes #65
1 parent 5a471a7 commit f8334bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fmt_pretty.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ func (f *pretty) printStep(step *gherkin.Step, def *StepDef, c colors.ColorFunc)
220220
if m := def.Expr.FindStringSubmatchIndex(step.Text)[2:]; len(m) > 0 {
221221
var pos, i int
222222
for pos, i = 0, 0; i < len(m); i++ {
223+
if m[i] == -1 {
224+
continue // no index for this match
225+
}
223226
if math.Mod(float64(i), 2) == 0 {
224227
text += c(step.Text[pos:m[i]])
225228
} else {

0 commit comments

Comments
 (0)