Open sustcsugar opened 1 month ago
我也有行高显示异常这个问题,只要使用仓库中的prism.min.js与prism.min.css这个问题就会出现
我在 prism.min.css 中 把 pre[class=language-].line-numbers>code { position: relative; white-space: inherit } 改成 pre[class=language-].line-numbers>code { position: sticky; white-space: inherit } 就可以了,我也不知道为啥
配置如下:
主题中code的配置如下:
最终的效果如下图所示,代码块会自动换行,下方的滑动条也消失不见,同时也没有行号的显示:
按照网上的教程,修改了prism.css文件,添加了关于line-number的设置,行号显示了,但是又有新问题,文本选择的高亮范围和实际的行高不一致,如下图: