From 1e779a7b86833e64db42662793498f21bead8035 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Mon, 23 Sep 2024 12:26:17 +0800 Subject: [PATCH] chore: tweak --- .../src/node/container/codeTabs.ts | 14 +++------ .../src/node/container/tabs.ts | 30 +++++-------------- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/plugins/plugin-md-power/src/node/container/codeTabs.ts b/plugins/plugin-md-power/src/node/container/codeTabs.ts index c3e22d63..10164a6f 100644 --- a/plugins/plugin-md-power/src/node/container/codeTabs.ts +++ b/plugins/plugin-md-power/src/node/container/codeTabs.ts @@ -18,15 +18,13 @@ export const codeTabs: PluginSimple = (md) => { const titlesContent = titles.map((title, index) => { const icon = getFileIconName(title) - return `\` + return `` }).join('') return `${titlesContent}` }, - tabsCloseRenderer: () => `\ - -`, + tabsCloseRenderer: () => ``, tabOpenRenderer: ({ index }, tokens, tokenIndex) => { let foundFence = false @@ -49,13 +47,9 @@ export const codeTabs: PluginSimple = (md) => { } } - return `\ -`, }) } diff --git a/plugins/plugin-md-power/src/node/container/tabs.ts b/plugins/plugin-md-power/src/node/container/tabs.ts index d5a9c286..dc3803a3 100644 --- a/plugins/plugin-md-power/src/node/container/tabs.ts +++ b/plugins/plugin-md-power/src/node/container/tabs.ts @@ -15,33 +15,17 @@ export const tabs: PluginSimple = (md) => { return { id } }) - return `\ - -${titles - .map( - (title, titleIndex) => `\ - -`, - ) - .join('')}\ -` + return ` +${titles.map((title, titleIndex) => + ``, + ).join('')}` }, - tabsCloseRenderer: () => `\ - -`, + tabsCloseRenderer: () => ``, tabOpenRenderer: ({ index }) => - `\ -`, }) }