perf: 优化命令禁止发送消息时,slack消息会包含html标签内容

pull/12366/head
jiangweidong 2023-12-19 11:43:59 +08:00 committed by Bryan
parent 1afad40dd3
commit 83b91cb739
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ class SlackRenderer(mistune.Renderer):
lines[i] = prefix + line[4:-5]
return '\n'.join(lines)
def block_code(self, code, lang=None):
return f'`{code}`'
def link(self, link, title, content):
if title or content:
label = str(title or content).strip()