mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
breaking changes: 更改 rightside-bottom 為 rightside_bottom
feat: 置頂圖標改為在標題左側 feat: 可配置打賞按鈕的文字 feat: 側邊欄增加 系列文章顯示 feat: 增加 series 系列文章 標籤外掛 feat: 移除 addthis 分享 improvement: 代碼優化 improvement: tabs 標籤外掛的回到頂部箭頭位置調整 improvement: 更新 plugin.yml
This commit is contained in:
@@ -6,13 +6,11 @@
|
||||
|
||||
'use strict'
|
||||
|
||||
function postTabs (args, content) {
|
||||
const postTabs = (args, content) => {
|
||||
const tabBlock = /<!--\s*tab (.*?)\s*-->\n([\w\W\s\S]*?)<!--\s*endtab\s*-->/g
|
||||
|
||||
args = args.join(' ').split(',')
|
||||
const tabName = args[0]
|
||||
const tabActive = Number(args[1]) || 0
|
||||
|
||||
const matches = []
|
||||
let match
|
||||
let tabId = 0
|
||||
@@ -22,8 +20,7 @@ function postTabs (args, content) {
|
||||
!tabName && hexo.log.warn('Tabs block must have unique name!')
|
||||
|
||||
while ((match = tabBlock.exec(content)) !== null) {
|
||||
matches.push(match[1])
|
||||
matches.push(match[2])
|
||||
matches.push(match[1], match[2])
|
||||
}
|
||||
|
||||
for (let i = 0; i < matches.length; i += 2) {
|
||||
|
||||
Reference in New Issue
Block a user