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] markdown 代码块里含 $数字
时 的错误转义
#4537
Comments
Title: [Bug] Error escaping when markdown code block contains |
日经了属于是,主线版本依旧没有修复? |
Nikkei is yes, the mainline version is still not repaired? |
Unless the maintainers come up with a solution, I recommend you use my workaround I made in this fork: https://github.com/Algorithm5838/NextChat/tree/dollar-sign You can try it here: https://nextchat-git-dollar-sign-algorithm5838s-projects.vercel.app/ |
Thank you , I have tried this one in vercel , but it seems still not fixed ...🥶 |
I see. I've discovered the reason why this happens. It occurs when the first set of triple backticks (```) is immediately followed by a word, such as 'bash' in this case. If you remove the 'bash' part, it should render correctly. I'll work on fixing this issue later. |
This bug is complicated by the fact that the ReactMarkdown component, which was used in our project, does not support Latex syntax well. We've gone through several rounds of optimization with contributors in the community to solve this issue. However, unfortunately, the current solution does not cover all scenarios.We will continue to optimize as soon as possible to finally solve this problem |
Bug Description
当GPT回复的代码块中含有
$数字
时,比如$0
,$1
, ChatGPT-Next-Web 会在其前面加上\
,如\$0
,\$1
。Steps to Reproduce
可以用这条提示语来检查它返回的结果:
写一个shell脚本,接受一个目录为参数,检查这个目录下是否有空目录,并打印结果,请使用中文回答。
或者看这条 ShareGPT的结果:https://sharegpt.com/c/qEjWO15
Expected Behavior
$数字
正确的转义,不需要添加\
Screenshots
Deployment Method
Desktop OS
MacOS
Desktop Browser
Chrome
Desktop Browser Version
124.0.6367.62
Smartphone Device
No response
Smartphone OS
No response
Smartphone Browser
No response
Smartphone Browser Version
No response
Additional Logs
No response
The text was updated successfully, but these errors were encountered: