File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -95,16 +95,17 @@ def __call__(self, s: str) -> KeyValueArg:
9595 key_part , value_part = token .split (sep , 1 )
9696
9797 # The key is composed of:
98- # 1. Any preceding tokens (unescaped by str(t) in join )
99- # 2. The key part of the current token (re-tokenize to
100- # handle internal escapes correctly)
101- key_tokens = tokens [: i ] + self .tokenize (key_part )
98+ # 1. Any preceding tokens (already Escaped or regular strings )
99+ # 2. The key part of the current token (re-tokenize to catch internal escapes)
100+ key_tokens = tokens [: i ]
101+ key_tokens . extend ( self .tokenize (key_part ) )
102102 key = '' .join (str (t ) for t in key_tokens )
103103
104104 # The value is composed of:
105- # 1. The value part of the current token (re-tokenize)
106- # 2. Any succeeding tokens (unescaped by str(t) in join)
107- value_tokens = self .tokenize (value_part ) + tokens [i + 1 :]
105+ # 1. The value part of the current token (re-tokenize to catch internal escapes)
106+ # 2. Any succeeding tokens
107+ value_tokens = self .tokenize (value_part )
108+ value_tokens .extend (tokens [i + 1 :])
108109 value = '' .join (str (t ) for t in value_tokens )
109110
110111 break
You can’t perform that action at this time.
0 commit comments