ChatGPTNextWeb / ChatGPTNextWeb/NextChat

[Bug] markdown 代码块里含 `$数字`时 的错误转义

Open
#4,537 8 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
88.8k
Forks
59.1k
PR merge metrics
No merged PRs in 30d

Description

### Bug Description

当GPT回复的代码块中含有 `$数字` 时,比如 `$0`,`$1` , ChatGPT-Next-Web 会在其前面加上 `\` ,如 `\$0` ,`\$1`。

### Steps to Reproduce

可以用这条提示语来检查它返回的结果:

写一个shell脚本,接受一个目录为参数,检查这个目录下是否有空目录,并打印结果,请使用中文回答。

或者看这条 ShareGPT的结果:https://sharegpt.com/c/qEjWO15

### Expected Behavior

`$数字` 正确的转义,不需要添加 `\`

### Screenshots

![https://photo.cellmean.com/i/2024/04/18/rb0ulf-0.png](https://photo.cellmean.com/i/2024/04/18/rb0ulf-0.png)

### Deployment Method

- [ ] Docker
- [X] Vercel
- [ ] Server

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.