jinghu-moon / typora-see-yue-theme

See Yue 系列主题是一个自定义样式极多、简约、充满细节的 Typora 主题。(The See Yue series theme is a Typora theme with a plethora of custom styles, minimalism, and full of details.)
https://theme.typora.io/theme/see-yue/
190 stars 19 forks source link

代码块缩进显示不正确,另外代码块如何去掉滚动条(想直接查看整块代码😀)。 #60

Closed longyuigb456 closed 8 months ago

longyuigb456 commented 8 months ago
iShot_2024-01-24_09 10 46
jinghu-moon commented 8 months ago

打开 SeeYue/CSS/code-block/code-block.css,注释掉以下代码

/* 代码块行横向滚轮 */
#write pre.md-fences .CodeMirror-wrap .CodeMirror-code pre {
  overflow-x : var(--code-block-lines-horizontal-overflow-x) !important;
  white-space: var(--code-block-lines-horizontal-white-space) !important;
}

/* 代码块内容过多,滚动显示 */
  pre div.CodeMirror-scroll {
  position       : relative;
  max-height     : var(--code-block-max-height) !important;
  overflow-y     : auto;
  cursor         : auto !important;
  overflow-x     : hidden !important;
  scroll-behavior: smooth;
}

重启,即可

longyuigb456 commented 8 months ago

代码块已全部展示,但是缩进问题还是没解决

iShot_2024-01-24_09 27 45 iShot_2024-01-24_09 27 26
jinghu-moon commented 8 months ago

你使用的主题是不是最新版?主题版本可以在 see-yue-xxxx.css 首行看到。

我使用最新版主题 + Typora v1.8.5 + Windows 10,注释掉上面的代码,可以做到代码块缩进显示正确,代码块全部展示。是否可以提供缩进有误的代码,我来测试下。

longyuigb456 commented 8 months ago

/ 当前版本: 1.4.0 / mac typora 1.7.6

jinghu-moon commented 8 months ago

是否注释掉那两段代码。我测试了下 Go 代码,缩进没有问题。

你是如何在 Typora 里添加代码的?说下步骤,我看能不能复现。

longyuigb456 commented 8 months ago
iShot_2024-01-24_09 27 26

我这个图片里已经注释掉了,我用的是 ```go+回车

longyuigb456 commented 8 months ago

sorry,我这次注释掉可以了