handle /[/,`#]/ as sed delimeters
This commit is contained in:
parent
bfb34a4eb9
commit
e645a32f93
2 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
import re, traceback
|
||||
from src import ModuleManager, utils
|
||||
|
||||
REGEX_SED = re.compile("^(?:(\\S+)[:,] )?s/")
|
||||
REGEX_SED = re.compile(r"^(?:(\S+)[:,] )?s([/,`#]).*\2")
|
||||
|
||||
@utils.export("channelset",
|
||||
utils.BoolSetting("sed","Disable/Enable sed in a channel"))
|
||||
|
|
|
@ -44,7 +44,7 @@ class SedMatch(Sed):
|
|||
return None
|
||||
|
||||
def _sed_split(s: str) -> typing.List[str]:
|
||||
tokens = _tokens(s, "/")
|
||||
tokens = _tokens(s, s[1])
|
||||
if tokens and (not tokens[-1] == (len(s)-1)):
|
||||
tokens.append(len(s))
|
||||
|
||||
|
|
Loading…
Reference in a new issue