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
@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
function centerQuote(args, content) {
|
function centerQuote(args, content) {
|
||||||
return `<blockquote class="blockquote-center">
|
return `<blockquote class="blockquote-center">
|
||||||
<i class="fa fa-quote-left"></i>
|
<i class="fa fa-quote-left"></i>
|
||||||
${hexo.render.renderSync({ text: content, engine: 'markdown' })}
|
${hexo.render.renderSync({ text: content, engine: 'markdown' })}
|
||||||
<i class="fa fa-quote-right"></i>
|
<i class="fa fa-quote-right"></i>
|
||||||
</blockquote>`;
|
</blockquote>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
hexo.extend.tag.register('centerquote', centerQuote, {ends: true});
|
hexo.extend.tag.register('centerquote', centerQuote, {ends: true});
|
||||||
|
|||||||
@ -7,9 +7,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function postNote(args, content) {
|
function postNote(args, content) {
|
||||||
return `<div class="note ${args.join(' ')}">
|
return `<div class="note ${args.join(' ')}">${hexo.render.renderSync({text: content, engine: 'markdown'})}</div>`;
|
||||||
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
|
|
||||||
</div>`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hexo.extend.tag.register('note', postNote, {ends: true});
|
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();
|
postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'}).trim();
|
||||||
|
|
||||||
tabId += 1;
|
tabId++;
|
||||||
tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
|
tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
|
||||||
|
|
||||||
((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId);
|
((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId);
|
||||||
|
|
||||||
var isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : '';
|
var isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : '';
|
||||||
let icon = tabIcon.trim();
|
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>`);
|
tabIcon.length > 0 && (tabIcon = `<i class="${icon}"${isOnlyicon}></i>`);
|
||||||
|
|
||||||
var isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';
|
var isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user