mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-05-11 22:54:11 +00:00
fix: correct ESCAPABLE_CHARS in query_lang tokenizer
Replace duplicate double-quote with single-quote so that escaped single quotes inside single-quoted strings are handled correctly (e.g. 'O''Brien' now tokenizes as O'Brien instead of O'Brien). Discovered during automated code review.
This commit is contained in:
@@ -61,7 +61,7 @@ class Tokenizer:
|
||||
pos: int
|
||||
current_char: str | None
|
||||
|
||||
ESCAPABLE_CHARS = ["\\", '"', '"']
|
||||
ESCAPABLE_CHARS = ["\\", '"', "'"]
|
||||
NOT_IN_ULITERAL = [":", " ", "[", "]", "(", ")", "=", ","]
|
||||
|
||||
def __init__(self, text: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user