mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 13:07:06 +08:00
fix: 修復當關閉代碼渲染后,標簽外挂裏的代碼塊會被壓縮到一行的bugs
improvements: 優化網站最後更新時間顯示,’0天前‘改爲’今天‘
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 })
|
||||
|
||||
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user