Make \0 work as expected

master
expectocode 2019-09-12 00:10:09 +02:00
parent 29a47c73bf
commit 01ae7b1cc6
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ last_msgs = defaultdict(lambda: deque(maxlen=10))
def doit(chat_id, match, original):
fr = match.group(1)
to = match.group(2)
to = to.replace('\\/', '/')
to = (to
.replace('\\/', '/')
.replace('\\0', '\\g<0>'))
try:
fl = match.group(3)
if fl is None: