fix: svg_import tokenizer preserves command/number order (fixes V-command crash)

This commit is contained in:
Tom
2026-03-06 18:34:27 +01:00
parent 0688626781
commit 373ab35a10

View File

@@ -40,8 +40,13 @@ _TOKEN_RE = re.compile(
def _tokenize_path(d: str) -> List[str]:
return [tok for tok, _ in _TOKEN_RE.findall(d) if tok] + \
[num for _, num in _TOKEN_RE.findall(d) if num]
tokens = []
for tok, num in _TOKEN_RE.findall(d):
if tok:
tokens.append(tok)
elif num:
tokens.append(num)
return tokens
def _parse_path_tokens(tokens: List[str]) -> List[Polygon]: