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: