diff options
author | holger krekel <holger@merlinux.eu> | 2014-10-14 10:10:18 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2014-10-14 10:10:18 +0200 |
commit | 0384af89a01922224a52d241dc56fdae07ff72a9 (patch) | |
tree | aa7d9fd2457ae12d070dce383e00c48416f81ba7 /tox | |
parent | e0c03b58771b747f3a90bbbd94ed82c55ee9023b (diff) | |
parent | f8c7a23c1a7e8c1450bbea98f581adba993d23c8 (diff) | |
download | tox-git-0384af89a01922224a52d241dc56fdae07ff72a9.tar.gz |
Merged in msabramo/tox/allow_backslash_escape_curly_braces_msabramo_2 (pull request #93)
Allow backslashing curly braces to prevent expansion
Diffstat (limited to 'tox')
-rw-r--r-- | tox/_config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tox/_config.py b/tox/_config.py index 5d259c43..f0ad87e7 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -484,8 +484,8 @@ class IndexServerConfig: self.url = url RE_ITEM_REF = re.compile( - ''' - [{] + r''' + (?<!\\)[{] (?:(?P<sub_type>[^[:{}]+):)? # optional sub_type for special rules (?P<substitution_value>[^{}]*) # substitution key [}] @@ -752,7 +752,7 @@ class CommandParser(object): def word_has_ended(): return ((cur_char in string.whitespace and ps.word and ps.word[-1] not in string.whitespace) or - (cur_char == '{' and ps.depth == 0) or + (cur_char == '{' and ps.depth == 0 and not ps.word.endswith('\\')) or (ps.depth == 0 and ps.word and ps.word[-1] == '}') or (cur_char not in string.whitespace and ps.word and ps.word.strip() == '')) |