mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 05:47:53 +00:00
Normalize quote character in arg parsing. Closes #42
This commit is contained in:
parent
e535e45d90
commit
e382d05395
1 changed files with 4 additions and 0 deletions
|
|
@ -14,6 +14,10 @@ from pluralkit.system import System
|
|||
|
||||
def next_arg(arg_string: str) -> Tuple[str, Optional[str]]:
|
||||
# A basic quoted-arg parser
|
||||
|
||||
for quote in "“‟”":
|
||||
arg_string = arg_string.replace(quote, "\"")
|
||||
|
||||
if arg_string.startswith("\""):
|
||||
end_quote = arg_string[1:].find("\"") + 1
|
||||
if end_quote > 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue