]> jfr.im git - erebus.git/commitdiff
subtext - allow empty replace
authorJohn Runyon <redacted>
Sat, 21 Oct 2023 02:20:57 +0000 (20:20 -0600)
committerJohn Runyon <redacted>
Sat, 21 Oct 2023 02:20:57 +0000 (20:20 -0600)
modules/subtext.py

index 2a87c0efd1d102b03937d275b304f0402b7fca0c..c0c0fd1ec2c768a812aefd2aa86a0b74961f0e03 100644 (file)
@@ -23,7 +23,7 @@ modstop = lib.modstop
 # module code
 import re
 from collections import namedtuple
-re_findsub = re.compile(r"""s([/'";:!@#$%^&-_=`~])(?P<search>.+?)\1(?P<replace>.+?)(?:\1(?P<global>g)?|$)""")
+re_findsub = re.compile(r"""s([/'";:!@#$%^&-_=`~])(?P<search>.+?)\1(?P<replace>.*?)(?:\1(?P<global>g)?|$)""")
 Line = namedtuple('Line', ['sender', 'msg'])
 lastline = {}
 @lib.hooknum("PRIVMSG")