Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsms committed Sep 13, 2023
1 parent 88da249 commit 5362f38
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions scripts/tag-replacer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,10 @@
hexo.extend.filter.register('before_post_render', function (data) {
// vuepress style tips
data.content = data.content
.replace(/::: tip/g, '{% note info %}')
.replace(/:::tip/g, '{% note info %}')
.replace(/::: info/g, '{% note info %}')
.replace(/:::info/g, '{% note info %}')
.replace(/::: warning/g, '{% note warning %}')
.replace(/:::warning/g, '{% note warning %}')
.replace(/::: warn/g, '{% note warning %}')
.replace(/:::warn/g, '{% note warning %}')
.replace(/::: danger/g, '{% note danger %}')
.replace(/:::danger/g, '{% note danger %}')
.replace(/::: error/g, '{% note danger %}')
.replace(/:::error/g, '{% note danger %}')
.replace(/:::/g, '{% endnote %}');
.replace(/:::\s?(tip|info)/ig, '{% note info %}')
.replace(/:::\s?(warning|warn)/ig, '{% note warning %}')
.replace(/:::\s?(danger|error)/ig, '{% note danger %}')
.replace(/:::/ig, '{% endnote %}');

return data;
});

0 comments on commit 5362f38

Please sign in to comment.