Skip to content

Commit

Permalink
Fix pandoc rendering error
Browse files Browse the repository at this point in the history
* See: #12
  • Loading branch information
stevenjoezhang committed May 28, 2020
1 parent 898e7b9 commit 17502da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions scripts/tags/center-quote.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

function centerQuote(args, content) {
return `<blockquote class="blockquote-center">
<i class="fa fa-quote-left"></i>
${hexo.render.renderSync({ text: content, engine: 'markdown' })}
<i class="fa fa-quote-right"></i>
</blockquote>`;
<i class="fa fa-quote-left"></i>
${hexo.render.renderSync({ text: content, engine: 'markdown' })}
<i class="fa fa-quote-right"></i>
</blockquote>`;
}

hexo.extend.tag.register('centerquote', centerQuote, {ends: true});
Expand Down
4 changes: 1 addition & 3 deletions scripts/tags/note.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down
4 changes: 2 additions & 2 deletions scripts/tags/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' : '';
Expand Down

0 comments on commit 17502da

Please sign in to comment.