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

粘贴数学公式时渲染报错 #621

Closed
zTree opened this issue Jul 24, 2020 · 1 comment
Closed

粘贴数学公式时渲染报错 #621

zTree opened this issue Jul 24, 2020 · 1 comment
Assignees
Milestone

Comments

@zTree
Copy link
Contributor

zTree commented Jul 24, 2020

编辑模式

  • wysiwyg 所见即所得模式
  • ir 即时渲染模式
  • sv 分屏编辑预览模式

描述问题

当粘贴多行文本中,且有多个 Mathjax 块时解析会不正常

案例1:

-----------------------粘贴以下内容 --------------
下面是 A 的式子:

$$a = 1 + 2$$

下面是 B 的式子:

$$b = 2+3$$

下面是 C 的式子:

$$c = 3+4$$
-----------------------------------------------------

直接出现解析错误,图片如下:
image
image
image

案例2:

-----------------------粘贴以下内容 --------------
下面是 A 的式子:

$$
a = 1 + 2
$$

下面是 B 的式子:

$$
b = 2+3
$$

下面是 C 的式子:

$$
c = 3+4
$$
-----------------------------------------------------

在 案例2 中 分屏编辑预览模式 显示完全正常;所见即所得模式即时渲染模式 解析内容块正常,但是没有对 MathJax 进行渲染,除非粘贴后再进行 Keydown 输入内容
image
image

期待的结果

正确结果应该是粘贴后,对 Mathjax 块进行正确识别,并且进行渲染
image

@88250 88250 self-assigned this Jul 28, 2020
@88250 88250 added this to the 3.3 milestone Jul 28, 2020
@88250 88250 changed the title 粘贴多行文本时,Mathjax 解析异常 粘贴数学公式时渲染报错 Jul 28, 2020
88250 added a commit to 88250/lute that referenced this issue Jul 28, 2020
粘贴数学公式时渲染报错
Vanessa219/vditor#621
@88250
Copy link
Collaborator

88250 commented Jul 28, 2020

感谢反馈,这个问题主要是因为对形如 $$foo$$ 的数学公式块解析有缺陷导致,已经改进。

@88250 88250 closed this as completed Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants