mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-22 22:37:37 +08:00
🐛 mdts反转义错误的问题
This commit is contained in:
parent
4deb7d11a1
commit
c66d470166
@ -12,19 +12,11 @@ md_test = on_command("mdts", permission=SUPERUSER)
|
||||
btn_test = on_command("btnts", permission=SUPERUSER)
|
||||
latex_test = on_command("latex", permission=SUPERUSER)
|
||||
|
||||
placeholder = {
|
||||
"[": "[",
|
||||
"]": "]",
|
||||
"&": "&",
|
||||
",": ",",
|
||||
"\n" : r"\n",
|
||||
}
|
||||
|
||||
|
||||
@md_test.handle()
|
||||
async def _(bot: T_Bot, event: T_MessageEvent, arg: v11.Message = CommandArg()):
|
||||
await md.send_md(
|
||||
str(arg),
|
||||
v11.utils.unescape(str(arg)),
|
||||
bot,
|
||||
message_type=event.message_type,
|
||||
session_id=event.user_id if event.message_type == "private" else event.group_id
|
||||
@ -43,7 +35,7 @@ async def _(bot: T_Bot, event: T_MessageEvent, arg: v11.Message = CommandArg()):
|
||||
|
||||
@latex_test.handle()
|
||||
async def _(bot: T_Bot, event: T_MessageEvent, arg: v11.Message = CommandArg()):
|
||||
latex_text = f"$${str(arg)}$$"
|
||||
latex_text = f"$${v11.utils.unescape(str(arg))}$$"
|
||||
img = await md_to_pic(latex_text)
|
||||
await bot.send(event=event, message=MessageSegment.image(img))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user