mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Fix pandoc rendering error
* See: https://github.com/next-theme/hexo-theme-next/issues/12
This commit is contained in:
parent
898e7b9cab
commit
17502dacf4
@ -7,9 +7,7 @@
|
||||
'use strict';
|
||||
|
||||
function postNote(args, content) {
|
||||
return `<div class="note ${args.join(' ')}">
|
||||
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
|
||||
</div>`;
|
||||
return `<div class="note ${args.join(' ')}">${hexo.render.renderSync({text: content, engine: 'markdown'})}</div>`;
|
||||
}
|
||||
|
||||
hexo.extend.tag.register('note', postNote, {ends: true});
|
||||
|
||||
@ -35,14 +35,14 @@ function postTabs(args, content) {
|
||||
|
||||
postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'}).trim();
|
||||
|
||||
tabId += 1;
|
||||
tabId++;
|
||||
tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
|
||||
|
||||
((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId);
|
||||
|
||||
var isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : '';
|
||||
let icon = tabIcon.trim();
|
||||
icon = icon.startsWith('fa') ? icon : 'fa fa-' + icon;
|
||||
if (!icon.startsWith('fa')) icon = 'fa fa-' + icon;
|
||||
tabIcon.length > 0 && (tabIcon = `<i class="${icon}"${isOnlyicon}></i>`);
|
||||
|
||||
var isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user