support \(...\) and \[...\] style math formula #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
解决gpt回复的公式使用 (...) 和 [...] 格式导致的渲染问题 ChatGPTNextWeb#3436 (comment)
remark-math 里有人讨论了这个问题,不过结论是不会支持这种格式 remarkjs/remark-math#39
最后参考了这里的实现,不会修改代码块(即```...```中的文本)中的文本:
danny-avila/LibreChat#1585
https://github.com/danny-avila/LibreChat/pull/1585/files#diff-9850a69e517911cf0cdab10bb95d007c71d78758bfd1cc0bb76ccc30a533811c