mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-25 18:23:15 +02:00
Fixed the order Search/Replace expressions are applied.
S/R expressions where inserted at the start of the rules list in order so they where applied in reverse. Used a reverse iterator over the list of search/replace expressions so they are applied in the correct order.
This commit is contained in:
parent
82ca10aca3
commit
9c5faee800
1 changed files with 1 additions and 1 deletions
|
|
@ -538,7 +538,7 @@ def do_search_replace(search_pattern, replace_txt):
|
|||
search_replace = getattr(self.extra_opts, 'search_replace', None)
|
||||
if search_replace:
|
||||
search_replace = json.loads(search_replace)
|
||||
for search_pattern, replace_txt in search_replace:
|
||||
for search_pattern, replace_txt in reversed(search_replace):
|
||||
do_search_replace(search_pattern, replace_txt)
|
||||
|
||||
end_rules = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue