Fix snippet generation when step contains percentage symbol