ChatGPTNextWeb / ChatGPTNextWeb/NextChat

[Bug] 在错误的时机对Latex进行解析,导致`$`xxx`$`的$符号意外被吞

Open
#5,955 13 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

### 📦 部署方式

官方安装包

### 📌 软件版本

2.15.8

### 💻 系统环境

Windows

### 📌 系统版本

Windows 11 专业版 23H2 22635.4655 Windows 功能体验包 1000.22700.1065.0

### 🌐 浏览器

Edge

### 📌 浏览器版本

132.0.2957.55 (正式版本) stable应用,beta频道 (64 位)

### 🐛 问题描述

当我尝试发送以下内容:
> ```
>OrgCommandText
> : ~('$'|[\r\n])+ | '$'
> ;
>
>OrgCommandExprStart
> : '${' -> pushMode(DEFAULT_MODE)
> ;
>
>OrgCommandEnd
> : ('\r\n' | '\n') -> popMode
> ;
>```
>把这个转换为jflex

的时候,猜测由于$$会被识别为内联Latex表达式,所以被吞了,发送的时候变成了

>```
>OrgCommandText
> : ~('|[\r\n])+
> | '
> ;
>
>OrgCommandExprStart
> : '${' -> pushMode(DEFAULT_MODE)
> ;
>
>OrgCommandEnd
> : ('\r\n' | '\n') -> popMode
> ;
>```
>把这个转换为jflex

同时AI的回答也因为输入的错误导致了错误的结果。

### 📷 复现步骤

发送如下内容
>```
>'$'test'$'
>```

发现发送以后变成了
>```
>'test'
>```

### 🚦 期望结果

成功发送上述内容,包含$符号

### 📝 补充信息

* 使用`\$`转义也是不可行的
* 只要是$',都会被吞,如果只发送一个$',那么会发送一个空白信息

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.