Skip to content

Commit

Permalink
Fix a tiny gyb bug
Browse files Browse the repository at this point in the history
Probably doesn't affect anything

Swift SVN r32861
  • Loading branch information
Dave Abrahams committed Oct 24, 2015
1 parent 37f9daf commit b4b8e6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def splitLines(s):
return [ l + '\n' for l in s.split('\n') ]

# text on a line up to the first '$$', '${', or '%%'
literalText = r'(?: [^$\n@] | \$(?![${]) | @(?!@) )*'
literalText = r'(?: [^$\n%] | \$(?![${]) | %(?!%) )*'

# The part of an '@end' line that follows the '@' sign
atEndLine = r'[\ \t]* end [\ \t]* (?: \# .* )? $'
Expand Down Expand Up @@ -168,7 +168,7 @@ def tokenizeTemplate(templateText):
... % print x
... % # different indentation
... % twice
... and some lines that literally start with %
... and some lines that literally start with a %% token
... %% first line
... %% second line
... '''):
Expand All @@ -183,7 +183,7 @@ def tokenizeTemplate(templateText):
('atLines', '% for x in zz:')
('atLines', '% # different indentation')
('atLines', '% twice')
('literal', 'and some lines that literally start with %')
('literal', 'and some lines that literally start with a % token')
"""
pos = 0
end = len(templateText)
Expand Down

0 comments on commit b4b8e6c

Please sign in to comment.