Skip to content

Commit

Permalink
improved tag handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bmabey committed Apr 27, 2009
1 parent d7fdafd commit 81f29c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cucumber.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class GherkinLexer(RegexLexer):
'single_string': [
(r"'", String, "#pop"),
(r'(<)([^>]*)(>)', bygroups(Operator, Literal.String.Symbol, Operator)),
(r"(\s|.)", String),
(r"[^']", String),
],
'root': [
(r'\n', Text),
Expand All @@ -54,7 +54,7 @@ class GherkinLexer(RegexLexer):
(r"'", String, "single_string"),
(r'(<)([^>]*)(>)', bygroups(Operator, Literal.String.Symbol, Operator)),
(r'#.*$', Comment),
(r'@\w+', Name.Namespace),
(r'@[^@\s]+', Name.Namespace),
(r'(Given|When|Then|And|But)', Keyword),
(r'^(Feature|Story)(:)(.*)$', bygroups(Name.Class, Name.Class, Name.Constant), 'narrative'),
(r'(\s+)(Background|Scenario|Scenario Outline)(:)(.*)$', bygroups(Text, Name.Class, Name.Class, Name.Constant), "multiline_descriptions"),
Expand Down
2 changes: 1 addition & 1 deletion cucumber_on_github.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html><head><title>Gherkin with Github colors</title><link rel="stylesheet" href="github.css"></head><body><div class="highlight"><pre><span class="nn">@foo</span> <span class="nn">@bar</span> <span class="c"># some comment</span>
<html><head><title>Gherkin with Github colors</title><link rel="stylesheet" href="github.css"></head><body><div class="highlight"><pre><span class="nn">@foo34</span> <span class="nn">@bar</span> <span class="c"># some comment</span>
<span class="nc">Feature:</span><span class="no"> proof of concept</span><span class="nb"></span>

<span class="nb"> In order to read Cucumber features faster and eaiser on Github </span>
Expand Down
2 changes: 1 addition & 1 deletion sample.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@foo @bar # some comment
@foo34 @bar # some comment
Feature: proof of concept

In order to read Cucumber features faster and eaiser on Github
Expand Down

0 comments on commit 81f29c7

Please sign in to comment.