File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -135,9 +135,8 @@ def _split(self, data):
135135
136136 return data [:len1 ], binary , data [idx + 1 :]
137137
138- _whitespace_re = re .compile (br'[\0\t\r\014\n ]+' )
138+ _whitespace_or_comment_re = re .compile (br'[\0\t\r\014\n ]+|%[^\r\n\v]* ' )
139139 _token_re = re .compile (br'/{0,2}[^]\0\t\r\v\n ()<>{}/%[]+' )
140- _comment_re = re .compile (br'%[^\r\n\v]*' )
141140 _instring_re = re .compile (br'[()\\]' )
142141
143142 @classmethod
@@ -148,8 +147,7 @@ def _tokens(cls, text):
148147 """
149148 pos = 0
150149 while pos < len (text ):
151- match = (cls ._comment_re .match (text , pos ) or
152- cls ._whitespace_re .match (text , pos ))
150+ match = cls ._whitespace_or_comment_re .match (text , pos )
153151 if match :
154152 yield (_TokenType .whitespace , match .group ())
155153 pos = match .end ()
You can’t perform that action at this time.
0 commit comments