Don't unicode_escape the argument if using regex mode.
This was causing issues with backslashes.
This commit is contained in:
parent
e2a8f95b01
commit
3c061f8daa
1 changed files with 4 additions and 1 deletions
|
@ -54,6 +54,9 @@ def contentreplace_argparse(args):
|
|||
replace_to = pyperclip.paste()
|
||||
else:
|
||||
replace_from = codecs.decode(args.replace_from, 'unicode_escape')
|
||||
if args.do_regex:
|
||||
replace_to = args.replace_to
|
||||
else:
|
||||
replace_to = codecs.decode(args.replace_to, 'unicode_escape')
|
||||
|
||||
for filename in filenames:
|
||||
|
|
Loading…
Reference in a new issue