Skip to content

Commit

Permalink
fix issue when no title
Browse files Browse the repository at this point in the history
  • Loading branch information
CHN-beta committed Oct 21, 2020
1 parent c847717 commit de43f7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ hexo.extend.filter.register('before_post_render', function (data) {
admonitionContent += '\n';
}

if (p3.replace(/\s+/g, '') === '""') {
if (p3.replace(/\s+/g, '') === '""' || p3.replace(/\s+/g, '') === '') {
return '<div class="admonition ' + p2.toLowerCase() + '">' + md.render(admonitionContent) + '</div>\n\n';
} else {
p3 = p3.trim() === '' ? p2 : p3.replace(/(^ |")|("| $)/g, '');
Expand Down

0 comments on commit de43f7f

Please sign in to comment.