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,7 +54,10 @@ def contentreplace_argparse(args):
|
||||||
replace_to = pyperclip.paste()
|
replace_to = pyperclip.paste()
|
||||||
else:
|
else:
|
||||||
replace_from = codecs.decode(args.replace_from, 'unicode_escape')
|
replace_from = codecs.decode(args.replace_from, 'unicode_escape')
|
||||||
replace_to = codecs.decode(args.replace_to, '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:
|
for filename in filenames:
|
||||||
print(filename)
|
print(filename)
|
||||||
|
|
Loading…
Reference in a new issue