fix: 修復當關閉代碼渲染后,標簽外挂裏的代碼塊會被壓縮到一行的bugs

improvements: 優化網站最後更新時間顯示,’0天前‘改爲’今天‘
This commit is contained in:
Jerry
2020-08-24 22:56:58 +08:00
parent 4aacafdae1
commit 40fd319cb2
14 changed files with 109 additions and 20 deletions

View File

@@ -44,7 +44,7 @@ function hideBlock (args, content) {
group += '"'
return `<div class="hide-block"><button type="button" class="hide-button button--animated" ${group}>${display}
</button><span class="hide-content">${hexo.render.renderSync({ text: content, engine: 'markdown' }).split('\n').join('')}</span></div>`
</button><span class="hide-content">${hexo.render.renderSync({ text: content, engine: 'markdown' })}</span></div>`
}
function hideToggle (args, content) {

View File

@@ -7,9 +7,7 @@
'use strict'
function mermaid (args, content) {
return `<div class="mermaid">
${content}
</div>`
return `<div class="mermaid">${content}</div>`
}
hexo.extend.tag.register('mermaid', mermaid, { ends: true })

View File

@@ -6,9 +6,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 })