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

单行 $$ 行尾若有更多字符,显示失败,MathJax 则没问题。 #712

Closed
vikyd opened this issue Nov 13, 2024 · 9 comments
Closed
Labels
enhancement New feature or request

Comments

@vikyd
Copy link

vikyd commented Nov 13, 2024

描述这个Bug

能正常显示:

$$v \approx 900$$

未能正常显示:

$$v \approx 900$$ abcdef

⬇️ md-editor-v3 不能渲染后者:
image

Github 官方使用的 MathJax 能渲染后者:

image

https://markdown.com.cn/editor/ 也能渲染一部分:
image

版本号

4.21.3

问题重现链接

No response

@imzbf
Copy link
Owner

imzbf commented Nov 13, 2024

github好像把 $$内容$$ 这个语法从块级转换成了行内

我们是把 $$内容$$ 只视为了块级的,$内容$是行内,单$是否能够解决你的这个问题?

@vikyd
Copy link
Author

vikyd commented Nov 13, 2024

@imzbf 目的是渲染大模型的回答,而非我们自己拼接出来的 Markdown 内容。

@vikyd
Copy link
Author

vikyd commented Nov 13, 2024

字节的豆包 https://www.doubao.com/chat/ 也能相对正常的渲染出来。

@imzbf imzbf added the enhancement New feature or request label Nov 13, 2024
@imzbf
Copy link
Owner

imzbf commented Nov 15, 2024

在5.0.1中修复了这个问题,请尝试

@vikyd
Copy link
Author

vikyd commented Nov 15, 2024

试了下 5.0.1。

可以:

a$$v \approx 900$$a

a$$v \approx 900$$ a

但下面依然不行,开头 $$ 前无内容、且结尾 $$ 后有内容(哪怕时空格)时:

$$v \approx 900$$a

@imzbf
Copy link
Owner

imzbf commented Nov 15, 2024

试试beta版是否还有问题,npm i md-editor-v3@beta

@vikyd
Copy link
Author

vikyd commented Nov 15, 2024

@imzbf good, 可以了。

@vikyd
Copy link
Author

vikyd commented Nov 15, 2024

md-editor-v3@beta5.0.2-0 有另外的问题:顶部工具栏高度变得很小、图标也很小。

image

@imzbf
Copy link
Owner

imzbf commented Nov 17, 2024

你检查一下你的图标和文档页面的图标css设置是否一致,不一致的话可能你项目有别的给覆盖了

@imzbf imzbf closed this as completed Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants