Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: KOOK 解析 kmarkdown 的特殊字符有误 #1227

Closed
9cats opened this issue Oct 15, 2023 · 3 comments
Closed

Bug: KOOK 解析 kmarkdown 的特殊字符有误 #1227

9cats opened this issue Oct 15, 2023 · 3 comments

Comments

@9cats
Copy link

9cats commented Oct 15, 2023

Describe the bug

解析 [ ] ` - 这四个字符有误

其中 - 只有在连续的时候才会解析错误,例如 test -adb text 这条指令正常解析,但是 test --gamma=1 这条指令解析就有问题

Steps to reproduce

在 KOOK 输入指令

echo 1:[ 2:] 3:` 4:--

从 bot 得到响应是:

1:\[ 2:\] 3:\` 4:\-\-

Expected behavior

从 bot 得到的响应应该为:

1:[ 2:] 3:` 4:--

Screenshots

No response

Versions

  • OS: Windows 10
  • Platform: KOOK
  • Node version: 18.17.1
  • Koishi version: 4.15.1
  • koishi-plugin-kook version: 4.0.5

Additional context

No response

@9cats 9cats added the bug BUG label Oct 15, 2023
@9cats
Copy link
Author

9cats commented Oct 15, 2023

相关issue:#1050

@9cats
Copy link
Author

9cats commented Oct 15, 2023

https://github.com/satorijs/satori/blob/4cab923c895f28cf8fcfa421393ac9497d9f913d/adapters/kook/src/utils.ts#L86-L90
参考这里,再添加几行,替换掉以上四个字符应该就能解决解析不正常的问题

@shigma
Copy link
Member

shigma commented Nov 6, 2023

已修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants