Open RanchoCooper opened 8 years ago
解决办法:
numbers += '<span class="line">' + (firstLine + i) + '</span>\n';
content += '<span class="line';
content += (mark.indexOf(firstLine + i) !== -1) ? ' marked' : '';
content += '">' + line + '</span>\n';
源于: https://leokongwq.github.io/2016/10/14/hexo-codeblock-multiblank.html 亲测有效
例如这里, 文中多次用了code-block, 结果除了第一个代码块之外, 后面的代码块在开头结尾都会多出空行
可能原因:
我先在本地测试, 新建
hexo init _blog
, 然后把相应文件夹复制进去, 默认主题landscape下代码块显示没问题, 说明不是hexo解析时的问题.然后又把主题切换成
hexo-theme-yilia
, 这个问题又出现了, 大概推测是主题的问题但是我对比了 @MOxFIVE 的这篇文章, 同样是多次使用code-block, 但是并没有出现多出空行的问题
这就有点不明所以了...
难道是npm中的某个依赖包的版本问题么