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

sv 模式中在脚注下方输入文本出现渲染错误 #1518

Closed
justice2001 opened this issue Dec 14, 2023 · 3 comments
Closed

sv 模式中在脚注下方输入文本出现渲染错误 #1518

justice2001 opened this issue Dec 14, 2023 · 3 comments
Assignees
Milestone

Comments

@justice2001
Copy link
Contributor

justice2001 commented Dec 14, 2023

编辑模式

  • sv 分屏编辑预览模式

描述问题

偶然发现的bug,sv模式中,在脚注下方输入任何文本会出现全篇复制的问题。

暂时测试出来的触发条件: 页面中存在两条脚注

如果是解析渲染问题的话请在此处贴入 Markdown 原文

期待的结果

正常输入

截屏或录像

中间两次卡顿是输入了回车,其实输入任何字符都会把全文复制

bug

版本信息

  • 版本:v3.9.7
  • 操作系统:macOS 14.1.2
  • 浏览器:Chrome 120.0.6099.71

其他信息

@justice2001
Copy link
Contributor Author

justice2001 commented Dec 14, 2023

这个bug是从v3.8.16开始出现的,对比了下debugger输出的SpinVditorSVDOM的结构:

3.8.16以前的lute渲染出来的结构是每一个脚注都用div包了起来,而3.8.16开始lute渲染出来的就是把所有脚注包在的一个div里。

截屏2023-12-14 23 17 10

justice2001 added a commit to justice2001/vditor that referenced this issue Dec 15, 2023
@Vanessa219 Vanessa219 changed the title 在脚注下方输入文本出现渲染错误 sv 模式中在脚注下方输入文本出现渲染错误 Dec 15, 2023
@Vanessa219 Vanessa219 added this to the 3.9 milestone Dec 15, 2023
Vanessa219 pushed a commit that referenced this issue Dec 15, 2023
@Vanessa219
Copy link
Owner

贴入以下内容后输入会导致其他问题,还麻烦在修复一下,十分感谢。

QQ20231215-234211-HD.mp4
这里是一个脚注引用[^1],这里是另一个脚注引用[^bignote]。
[^1]: 第一个脚注定义。
[^bignote]: 脚注定义可使用多段内容。

    缩进对齐的段落包含在这个脚注定义内。

    ```
    可以使用代码块。
    ```

    还有其他行级排版语法,比如**加粗**和[链接](https://b3log.org)。

@Vanessa219 Vanessa219 reopened this Dec 15, 2023
@justice2001
Copy link
Contributor Author

这个我在尝试修复,不过现在还在考虑怎么分辨是否为脚注部分,我应该需要先把#1270修复才能处理这个问题

justice2001 added a commit to justice2001/vditor that referenced this issue Dec 16, 2023
justice2001 added a commit to justice2001/vditor that referenced this issue Dec 16, 2023
Vanessa219 pushed a commit that referenced this issue Dec 17, 2023
* 🐛 Fix #1518

* 🐛 Fix #1269

* 🗑️ Clean code for 1269

* 🐛 Fix link-ref-defs-block parsing error

* ♻️ Refactor the combine footnote function

* 🐛 Fix similar problem with #1518 on link-ref-defs-block
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