Skip to content

Commit

Permalink
🐛 移除 Pandoc 在脚注插入的换行符
Browse files Browse the repository at this point in the history
  • Loading branch information
zkqiang committed Dec 7, 2023
1 parent 1005839 commit b0cf438
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/filters/post-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,7 @@ hexo.extend.generator.register('post', function(locals) {
hexo.extend.filter.register('after_post_render', (page) => {
// 移除 hexo-renderer-pandoc 生成的 <colgroup>
page.content = page.content.replace(/<colgroup>.+?<\/colgroup>/gims, '');
// 移除 hexo-renderer-pandoc 生成的 <span class="footnote-text">...<br>...</span>
page.content = page.content.replace(/(class="footnote-text".+?)<br.+?>(.+?rev="footnote")/gims, '$1$2');
return page;
});

0 comments on commit b0cf438

Please sign in to comment.