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

剪藏知乎遇到链接会换行 #14400

Open
3 tasks done
Jiangshuon opened this issue Mar 19, 2025 · 17 comments
Open
3 tasks done

剪藏知乎遇到链接会换行 #14400

Jiangshuon opened this issue Mar 19, 2025 · 17 comments

Comments

@Jiangshuon
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

Image

Image

Expected result

。。

Screenshot or screen recording presentation

No response

Version environment

- Version: 最新
- Operating System: win11
- Browser (if used):

Log file

。。

More information

No response

@TCOTC
Copy link
Contributor

TCOTC commented Mar 19, 2025

截图看一下剪藏拓展的实验性选项

@Jiangshuon
Copy link
Author

哦哦,是那个选项的问题,关了就好了,不过印象中我没有主动打开过

@TCOTC
Copy link
Contributor

TCOTC commented Mar 19, 2025

截图看看是什么选项

@Jiangshuon
Copy link
Author

span那个选项

@88250 88250 self-assigned this Mar 19, 2025
@TCOTC
Copy link
Contributor

TCOTC commented Mar 20, 2025

Sorry, something went wrong.

@TCOTC
Copy link
Contributor

TCOTC commented Mar 20, 2025

Sorry, something went wrong.

@ruin1990
Copy link
Contributor

ruin1990 commented Mar 20, 2025

Image
正好是个span,然后继承了p的white-space: normal;以及.rich_media_content * word-wrap: break-word !important;
实际渲染没换行
这个逻辑我刚才查阅资料和问了一下AI

排查 overflow 设置
若父级有 overflow: hidden,可能隐藏换行效果。
检查是否有 text-overflow: ellipsis 截断文本。

重新确认了下样式,可是样式是灰的,去掉这部分也没有换行
Image

@88250 88250 removed their assignment Mar 20, 2025
@88250
Copy link
Member

88250 commented Mar 20, 2025

@TCOTC
Copy link
Contributor

TCOTC commented Mar 20, 2025

回帖里的书名号前面那个换行是正常的

@88250
Copy link
Member

88250 commented Mar 20, 2025

回帖里的书名号前面那个换行是正常的

也就是说没有问题?

@TCOTC
Copy link
Contributor

TCOTC commented Mar 20, 2025

Image

@88250
Copy link
Member

88250 commented Mar 20, 2025

明白了

@88250
Copy link
Member

88250 commented Mar 20, 2025

可能和 #14400 (comment) 这个类似吧

@ruin1990 你再看看这个例子是否有共同点?

@ruin1990
Copy link
Contributor

ruin1990 commented Mar 25, 2025

Image

@TCOTC 请问下,这个测试网页在哪,好像不是https://mp.weixin.qq.com/s/Ie3gq3k81c5B-L7uH2h9PQ
原文里应该楼主只给了对应的html段,不过style没有完整的,无法分析
如果是提供文章链接的地方(比如同一个公众号),应该是同一个问题@88250

这里我想知道究竟是啥style覆盖了span的换行style

@TCOTC
Copy link
Contributor

TCOTC commented Mar 25, 2025

@ruin1990
Copy link
Contributor

好的感谢提供,看了下最终的计算样式,display:inline
但是我和以前span换行问题的(网页)[https://www.bilibili.com/opus/465490977904921957]对比,
看起来是一样的样式,为什么结果表现一个span有换行,一个没有,我还需要再看看

@ruin1990
Copy link
Contributor

似乎依赖于非tag样式里的自然换行符(\n)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants