Hexo 代码块中tab替换space

将 Hexo文章代码块中的tab替换成space

步骤

  1. 打开站点配置文件_config.yml
  2. 修改tab_replace: ' '

配置后

1
2
3
4
5
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ' '
1
2
3
4
5
6
7
8
#include <iostream>
using namespace std;

int main()
{
cout << "Hello World";
return 0;
}