-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
query_is_modified is global and does not get reset at every call of singleurl() so, if a query is modified for a URL, the query for all the following URLs is automatically considered modified. Additionally --trim and --replace were setting query_is_modified to true unconditionally as long as a --trim or --replace option is passed to trurl, even if no changes were made. Which made it effectively just a convoluted way to check if any of --trim, --replace, --append query, --sort-query was passed. Since singleurl() was made recursive to implement --iterate, I could not just add query_is_modified = false at the start of singleurl() to fix the problem, so I have refactored the code to not need a global.
- Loading branch information
Showing
1 changed file
with
34 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters