summaryrefslogtreecommitdiff
path: root/tox
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2014-10-14 10:10:18 +0200
committerholger krekel <holger@merlinux.eu>2014-10-14 10:10:18 +0200
commit0384af89a01922224a52d241dc56fdae07ff72a9 (patch)
treeaa7d9fd2457ae12d070dce383e00c48416f81ba7 /tox
parente0c03b58771b747f3a90bbbd94ed82c55ee9023b (diff)
parentf8c7a23c1a7e8c1450bbea98f581adba993d23c8 (diff)
downloadtox-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.py6
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() == ''))