Skip to content

Commit

Permalink
change style
Browse files Browse the repository at this point in the history
  • Loading branch information
CHN-beta committed Oct 22, 2020
1 parent de43f7f commit 73b4969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var md = require('markdown-it')('commonmark');

hexo.extend.filter.register('before_post_render', function (data) {
let strRegExp = '(?<=^\n)(^!!! *)(note|info|todo|warning|attention|caution|failure|missing|fail|error)(.*\n)((^ {4}.*\n|^\n)+)';
let strRegExp = /(<\!-- *)(note|info|todo|warning|attention|caution|failure|missing|fail|error) (.)*?--> *\n(.*\n)*?(<\!-- end -->\n)/;
let admonitionRegExp = new RegExp(strRegExp, 'gmi');

let strData;
Expand All @@ -14,7 +14,7 @@ hexo.extend.filter.register('before_post_render', function (data) {
let admonitionContent = '';
for (const v of p4) {
admonitionContent += v.trim();
admonitionContent += '\n';
admonitionContent += '\n';3
}

if (p3.replace(/\s+/g, '') === '""' || p3.replace(/\s+/g, '') === '') {
Expand Down

0 comments on commit 73b4969

Please sign in to comment.