Ensure multiline message after line_treat are collapsed to one line
This commit is contained in:
parent
acded35e1a
commit
cdaad47b13
@ -80,6 +80,7 @@ def cmd_mediawiki(msg):
|
||||
raise IRCException("indicate a domain and a term to search")
|
||||
|
||||
return Response(get_page(msg.cmds[1], " ".join(msg.cmds[2:])),
|
||||
line_treat=lambda line: irc_format(parse_wikitext(msg.cmds[1], line)),
|
||||
channel=msg.receivers)
|
||||
|
||||
|
||||
|
@ -130,7 +130,7 @@ class Response:
|
||||
return self.treat_ctcp(self.nomore)
|
||||
|
||||
if self.line_treat is not None and self.elt == 0:
|
||||
self.messages[0] = self.line_treat(self.messages[0])
|
||||
self.messages[0] = self.line_treat(self.messages[0]).replace("\n", " ").strip()
|
||||
|
||||
msg = ""
|
||||
if self.channel is not None and self.nick is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user