commit | 56624a99a916fd27152d5b23364303acc0d707de | [log] [tgz] |
---|---|---|
author | Evan <evanunderscore@gmail.com> | Sun Jun 02 05:09:22 2019 +1000 |
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | Sat Jun 01 20:09:22 2019 +0100 |
tree | 469ecf27c685101302f1c9c365f394df174e68e9 | |
parent | 2b843ac0ae745026ce39514573c5d075137bef65 [diff] [blame] |
bpo-28595: Allow shlex whitespace_split with punctuation_chars (GH-2071)
diff --git a/Lib/shlex.py b/Lib/shlex.py index fb1130d..edea077 100644 --- a/Lib/shlex.py +++ b/Lib/shlex.py
@@ -246,7 +246,8 @@ escapedstate = 'a' self.state = nextchar elif (nextchar in self.wordchars or nextchar in self.quotes - or self.whitespace_split): + or (self.whitespace_split and + nextchar not in self.punctuation_chars)): self.token += nextchar else: if self.punctuation_chars: