mirror of https://github.com/jumpserver/jumpserver
perf: 优化命令禁止发送消息时,slack消息会包含html标签内容
parent
1afad40dd3
commit
83b91cb739
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue