From: John Runyon Date: Sat, 21 Oct 2023 02:20:57 +0000 (-0600) Subject: subtext - allow empty replace X-Git-Url: https://jfr.im/git/erebus.git/commitdiff_plain/d524dcc86cfea090fff93a1109d79a1f094927cf subtext - allow empty replace --- diff --git a/modules/subtext.py b/modules/subtext.py index 2a87c0e..c0c0fd1 100644 --- a/modules/subtext.py +++ b/modules/subtext.py @@ -23,7 +23,7 @@ modstop = lib.modstop # module code import re from collections import namedtuple -re_findsub = re.compile(r"""s([/'";:!@#$%^&-_=`~])(?P.+?)\1(?P.+?)(?:\1(?Pg)?|$)""") +re_findsub = re.compile(r"""s([/'";:!@#$%^&-_=`~])(?P.+?)\1(?P.*?)(?:\1(?Pg)?|$)""") Line = namedtuple('Line', ['sender', 'msg']) lastline = {} @lib.hooknum("PRIVMSG")