Skip to content

Commit

Permalink
Merge branch 'release/1.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
everzet committed Jun 10, 2011
2 parents b252021 + 8d50639 commit 906d7bd
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.0.4 / 2011-06-10
==================

* Fixed inability to comment pystrings

1.0.3 / 2011-04-21
==================

Expand Down
6 changes: 3 additions & 3 deletions src/Behat/Gherkin/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ protected function getNextToken()
{
return $this->getDeferredToken()
?: $this->scanEOS()
?: $this->scanLanguage()
?: $this->scanComment()
?: $this->scanPyStringOperator()
?: $this->scanPyStringContent()
?: $this->scanStep()
Expand All @@ -184,8 +186,6 @@ protected function getNextToken()
?: $this->scanFeature()
?: $this->scanTags()
?: $this->scanTableRow()
?: $this->scanLanguage()
?: $this->scanComment()
?: $this->scanNewline()
?: $this->scanText();
}
Expand Down Expand Up @@ -426,7 +426,7 @@ protected function scanTags()
*/
protected function scanLanguage()
{
if (false !== mb_strpos($this->line, '#') && false !== mb_strpos($this->line, 'language')) {
if (0 === mb_strpos(ltrim($this->line), '#') && false !== mb_strpos($this->line, 'language')) {
return $this->scanInput('/^\s*\#\s*language:\s*([\w_\-]+)\s*$/', 'Language');
}
}
Expand Down
11 changes: 11 additions & 0 deletions tests/Behat/Gherkin/Fixtures/etalons/commented_out.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
feature:
title: Fibonacci
language: en
line: 1
description: |-
In order to calculate super fast fibonacci series
As a pythonista
I want to use Python for that
scenarios: ~

34 changes: 34 additions & 0 deletions tests/Behat/Gherkin/Fixtures/features/commented_out.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Feature: Fibonacci
In order to calculate super fast fibonacci series
As a pythonista
I want to use Python for that

#
# Background:
# Given passing without a table
#
# Scenario: I'm a multiline name
# which goes on and on and on for three lines
# yawn
# Given passing without a table
#
# Scenario:
# Then I should see
# """
# a string with #something
# """
#
# Scenario Outline: Series
# When I ask python to calculate fibonacci up to <n>
# Then it should give me <series>
#
# Examples:
# | n | series |
# | 1 | [] |
# | 2 | [1, 1] |
# | 3 | [1, 1, 2] |
# | 4 | [1, 1, 2, 3] |
# | 6 | [1, 1, 2, 3, 5] |
# | 9 | [1, 1, 2, 3, 5, 8] |
# | 100 | [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] |
#
2 changes: 1 addition & 1 deletion vendor/Symfony/Component/ClassLoader
2 changes: 1 addition & 1 deletion vendor/Symfony/Component/Translation
2 changes: 1 addition & 1 deletion vendor/Symfony/Component/Yaml
Submodule Yaml updated 4 files
+1 −1 Escaper.php
+2 −2 Inline.php
+4 −0 Parser.php
+3 −3 Unescaper.php

0 comments on commit 906d7bd

Please sign in to comment.