Skip to content

Commit a61b364

Browse files
committed
Fixes indentation for note and tabs tags.
1 parent e948d35 commit a61b364

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scripts/tags/note.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
function postNote(args, content) {
1010
return '<div class="note ' + args.join(' ') + '">'
11-
+ hexo.render.renderSync({text: content, engine: 'markdown'}).trim()
11+
+ hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')
1212
+ '</div>';
1313
}
1414

1515
hexo.extend.tag.register('note', postNote, {ends: true});
16-
hexo.extend.tag.register('alert', postNote, {ends: true});
16+
hexo.extend.tag.register('subnote', postNote, {ends: true});

scripts/tags/tabs.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function postTabs(args, content) {
3333
var tabIcon = tabParameters[1] || '';
3434
var tabHref = '';
3535

36-
postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'});
36+
postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'}).trim();
3737

3838
tabId += 1;
3939
tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
@@ -55,3 +55,5 @@ function postTabs(args, content) {
5555
}
5656

5757
hexo.extend.tag.register('tabs', postTabs, {ends: true});
58+
hexo.extend.tag.register('subtabs', postTabs, {ends: true});
59+
hexo.extend.tag.register('subsubtabs', postTabs, {ends: true});

0 commit comments

Comments
 (0)