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

Compatible with line breaking behavior after setting the maximum height of code blocks #12726

Closed
TCOTC opened this issue Oct 7, 2024 · 2 comments
Assignees
Milestone

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Oct 7, 2024

兼容设置代码块最大高度后的换行行为

用了自定义css片段折叠代码块后存在一些问题:

div:not(#preview) > .protyle-wysiwyg .code-block .hljs {
    max-height: 300px;
}

问题

  1. 在不开启行号的情况下,经过一定行后(大概就是设置的代码最大高度),直接在末尾按enter,不会创建新行,只有先打几个字,在中间按enter才能创建新行
  2. 在开启行号的情况下,按enter一直能创建新行,但可视区域不会自动移到下一行,需要手动滚动
default.webm

希望
不开启行号的情况下,直接在末尾按enter,能创建新行,并且可视区域能自动移动到新创建的代码块行

备注:已经在新工作空间测试

Originally posted by @Achuan-2 in #10769 (comment)

@TCOTC
Copy link
Contributor Author

TCOTC commented Oct 7, 2024

建议跟 #12278 一起解决

@Kingions

This comment was marked as off-topic.

@siyuan-note siyuan-note deleted a comment Oct 25, 2024
Vanessa219 added a commit that referenced this issue Nov 23, 2024
@Vanessa219 Vanessa219 added this to the 3.1.14 milestone Nov 26, 2024
@Vanessa219 Vanessa219 changed the title 代码块尾部的空行无法显示 兼容设置代码块最大高度后的换行行为 Nov 26, 2024
@88250 88250 changed the title 兼容设置代码块最大高度后的换行行为 Compatible with line breaking behavior after setting the maximum height of code blocks Nov 26, 2024
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