Skip to content

Remove zero-width spaces from empty paragraph blocks #12273

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

Closed
TCOTC opened this issue Aug 17, 2024 · 8 comments
Closed

Remove zero-width spaces from empty paragraph blocks #12273

TCOTC opened this issue Aug 17, 2024 · 8 comments
Assignees
Milestone

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Aug 17, 2024

剔除空段落块中的零宽空格

空列表项按 Enter 不能正常反缩进,其他的列表复现不出来,只有这个文档里的这个列表有问题:列表问题.sy.zip

default.webm

大概是因为有个不知道哪来的零宽空格:

image

在第一次按 Enter 换行之后会产生一个只有零宽空格的块:

image

按 Enter 换行的时候应该要同时将这两个块中的零宽空格剔除,而不是保留

@TCOTC TCOTC changed the title 空列表项按 Enter 不能正常反缩进 剔除文本中的零宽空格 Aug 17, 2024
@TCOTC
Copy link
Contributor Author

TCOTC commented Oct 3, 2024

今天又遇到了一个不知道是从哪里来的零宽空格,影响了我使用列表

image

p.s. 两次都是在列表里的链接之后出现零宽空格,不知道为啥

@TCOTC TCOTC changed the title 剔除文本中的零宽空格 剔除空段落块中的零宽空格 Oct 3, 2024
@TCOTC
Copy link
Contributor Author

TCOTC commented Oct 3, 2024

想了想,应该是创建新段落块之后应该剔除其中的零宽空格,其他情况下就不需要剔除了

@88250
Copy link
Member

88250 commented Nov 5, 2024

我这里新建段落块没有:

image

@TCOTC
Copy link
Contributor Author

TCOTC commented Nov 5, 2024

@88250 用我上传的那个文档,按照录屏的步骤试一下

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 5, 2025

段落块零宽空格.sy.zip

如果块内容只有零宽空格,复制的块引用就粘贴不出来,此时需要剔除这个块中的零宽空格,然后粘贴的块引锚文本应该是块 ID

p.s. 在代码块中复制文本会剔除零宽空格,不知道是否符合预期

video.webm

@88250 88250 added this to the 3.1.25 milestone Mar 5, 2025
@88250 88250 changed the title 剔除空段落块中的零宽空格 Remove zero-width spaces from empty paragraph blocks Mar 5, 2025
Vanessa219 added a commit that referenced this issue Mar 5, 2025
@Vanessa219
Copy link
Member

第一个还麻烦在测试一下,第二个重现不了。

@Vanessa219
Copy link
Member

@88250 第二个问题能否在 SpinBlockDOM 处理一下

@88250
Copy link
Member

88250 commented Mar 5, 2025

已经处理

@88250 88250 closed this as completed Mar 5, 2025
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

3 participants