Only perform unicode escape in regex mode.
This commit is contained in:
parent
b06ebab241
commit
a5a86313fa
1 changed files with 2 additions and 1 deletions
|
@ -51,10 +51,11 @@ def contentreplace_argparse(args):
|
|||
if not replace_to:
|
||||
replace_to = pyperclip.paste()
|
||||
else:
|
||||
replace_from = codecs.decode(args.replace_from, 'unicode_escape')
|
||||
if args.do_regex:
|
||||
replace_from = args.replace_from
|
||||
replace_to = args.replace_to
|
||||
else:
|
||||
replace_from = codecs.decode(args.replace_from, 'unicode_escape')
|
||||
replace_to = codecs.decode(args.replace_to, 'unicode_escape')
|
||||
|
||||
for file in files:
|
||||
|
|
Loading…
Reference in a new issue