Normalize quote character in arg parsing. Closes #42
This commit is contained in:
parent
e535e45d90
commit
e382d05395
@ -14,6 +14,10 @@ from pluralkit.system import System
|
|||||||
|
|
||||||
def next_arg(arg_string: str) -> Tuple[str, Optional[str]]:
|
def next_arg(arg_string: str) -> Tuple[str, Optional[str]]:
|
||||||
# A basic quoted-arg parser
|
# A basic quoted-arg parser
|
||||||
|
|
||||||
|
for quote in "“‟”":
|
||||||
|
arg_string = arg_string.replace(quote, "\"")
|
||||||
|
|
||||||
if arg_string.startswith("\""):
|
if arg_string.startswith("\""):
|
||||||
end_quote = arg_string[1:].find("\"") + 1
|
end_quote = arg_string[1:].find("\"") + 1
|
||||||
if end_quote > 0:
|
if end_quote > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user