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

代码块自动补全会包含链接引用和脚注 #1269

Closed
Polepoint-CHN opened this issue Jul 26, 2022 · 3 comments
Closed

代码块自动补全会包含链接引用和脚注 #1269

Polepoint-CHN opened this issue Jul 26, 2022 · 3 comments
Assignees
Milestone

Comments

@Polepoint-CHN
Copy link

编辑模式

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

描述问题

问题1:
输入代码块语法,会自动包裹到不必要的内容。
如:1、当页面有脚注时,输入```会自动将脚注包裹在代码块中。
2、粘贴进编辑器的文本,在前方输入代码块起始标记```时,自动补充的结束标记```,只能将第一行文本包裹在代码块中,而不是整个粘贴进来的文本。(这个现象是偶现的)

问题2:
只想要删除结束标记```,把他重新写在正确的位置。但是在删除时,代码块开始标记```也会同时被删除,导致整个代码块标记都被删掉。

期待的结果

1、代码块开始标记和结束标记的位置可以由用户自己输入。而不是自动生成结束标记,导致不必要的文本被包裹在代码块中。
2、删除代码块结束标记时,不会导致代码块开始标记```被删掉。

截屏或录像

Vditor.-.-.Google.Chrome.2022-07-26.22-45-2420227262248302.mp4

版本信息

  • 版本:3.8.15
  • 操作系统:windows
  • 浏览器:chrome

其他信息

官方demo中存在同样问题。

如有临时对策可以暂时屏蔽这个问题,还请大佬指点一下!

@lizhangyi
Copy link

同问,我们项目也遇到同样的问题~ 不知道该怎么处理了。。

@88250 88250 assigned Vanessa219 and unassigned 88250 Aug 4, 2022
@Vanessa219 Vanessa219 added this to the 3.8 milestone Aug 4, 2022
@Vanessa219 Vanessa219 changed the title 代码块自动补全会包裹到不需要的内容 代码块自动补全会包含链接引用和脚注 Aug 4, 2022
Vanessa219 added a commit that referenced this issue Aug 4, 2022
@Polepoint-CHN
Copy link
Author

@Vanessa219 我升级到了3.8.17版本,发现代码块包裹脚注的问题仍然存在。同时还新增了几个问题:
1、编辑输入内容时,编辑栏内的文本会重复输入很多份,并包裹在代码块中。
2、当输入文本内容后,编辑页面会卡死,导致页面崩溃。
3、删除代码块结束标记```,仍然不能结束掉代码块。并且代码块开始标记```同样会被删掉。
4、ir模式下,输入```标记,再删除掉,脚注会跑到光标位置。

问题视频:
问题1、2:

20220808-235948.mp4

问题3:

20220809-000113.mp4

问题4:

20220809-001322.mp4

期待的结果
1、代码块开始标记和结束标记的位置可以由用户自己输入。而不是自动生成结束标记,导致不必要的文本被包裹在代码块中。
2、删除代码块结束标记时,不会导致代码块开始标记```被删掉。

如果这个问题较难修复,是否可以有暂时禁用代码块补全功能的方式呢?
希望大佬指点一下,感谢!

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

版本信息
版本:3.8.17
操作系统:windows10
浏览器:chrome

@88250
Copy link
Collaborator

88250 commented Aug 9, 2022

最近可能没有时间解决这个问题了,抱歉抱歉。

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

4 participants