allow spaces between the option symbols and the option text

master
Aevann 2023-06-24 17:00:33 +03:00
parent 1b1e13f025
commit 4760dcf3d3
1 changed files with 3 additions and 3 deletions

View File

@ -92,10 +92,10 @@ def add_options(self, body, v):
elif o.exclusive: s = '&&'
else: s = '$$'
if f'{s}{o.body_html}{s}' in body:
body = body.replace(f'{s}{o.body_html}{s}', option_body, 1)
elif not o.created_utc or o.created_utc < 1677622270:
if not o.created_utc or o.created_utc < 1677622270:
body += option_body
else:
body = re.sub(rf'{s} *{o.body_html} *{s}', option_body, body, count=1, flags=re.I)
return body