Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #40 from sehe/master
Browse files Browse the repository at this point in the history
Fix escape removal in SubstituteLexer
  • Loading branch information
guillermooo committed Feb 13, 2013
2 parents bedfdb9 + 477b082 commit 4f81b8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vex/parsers/s_cmd.py
Expand Up @@ -36,13 +36,13 @@ def _match_pattern(self):
if self.c == '\\':
buf.append(self.c)
self.consume()
if self.c in '\\':
# Don't store anything, we're escaping \.
self.consume()
elif self.c == self.delimiter:
if self.c == self.delimiter:
# Overwrite the \ we've just stored.
buf[-1] = self.delimiter
self.consume()
if self.c in '\\':
buf.append(self.c) # BUGFIXED: still need to escape \ in python regex!
self.consume()

if self.c == EOF:
break
Expand Down

0 comments on commit 4f81b8a

Please sign in to comment.