You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
The changes that caused #7 had to be nerfed because they were too good at finding spaces. But spaces should still be required between arguments.
Broken arg-parsing resulted from the code parsing an argument out of the middle and then also removing the spaces on both sides of it, so subsequent matches would usually fail because of the use of \s+. What's needed is enforcing the spaces (or line start/end) in order to match an argument, but making sure to leave one space when the parsed argument is removed from the input. (This may necessitate trim()'ing the search string before calling the AniTV API.)
Alternatively? Don't remove the args from the input as they're parsed. That could be a way toward better predictability.
I guess the real solution would be to actually parse the arguments (say, by tokenization), but whether implemented from scratch or imported from an existing library, that's a lot of effort and maybe even another dependency that shouldn't really be added.
The text was updated successfully, but these errors were encountered:
The changes that caused #7 had to be nerfed because they were too good at finding spaces. But spaces should still be required between arguments.
Broken arg-parsing resulted from the code parsing an argument out of the middle and then also removing the spaces on both sides of it, so subsequent matches would usually fail because of the use of
\s+
. What's needed is enforcing the spaces (or line start/end) in order to match an argument, but making sure to leave one space when the parsed argument is removed from the input. (This may necessitatetrim()
'ing the search string before calling the AniTV API.)Alternatively? Don't remove the args from the input as they're parsed. That could be a way toward better predictability.
I guess the real solution would be to actually parse the arguments (say, by tokenization), but whether implemented from scratch or imported from an existing library, that's a lot of effort and maybe even another dependency that shouldn't really be added.
The text was updated successfully, but these errors were encountered: