From 58381ba29479ab77f066281f3d878aebc1736d5f Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sat, 26 Apr 2025 01:40:24 +0800 Subject: [PATCH] test: update icon test --- plugins/plugin-md-power/src/node/inline/icons.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/plugin-md-power/src/node/inline/icons.ts b/plugins/plugin-md-power/src/node/inline/icons.ts index d9f7762b..9d4ab5cc 100644 --- a/plugins/plugin-md-power/src/node/inline/icons.ts +++ b/plugins/plugin-md-power/src/node/inline/icons.ts @@ -38,6 +38,7 @@ function createIconRule( if (next === 0x20 || next === 0x3A) return false + /* istanbul ignore if -- @preserve */ if (silent) return false @@ -137,8 +138,10 @@ export const iconPlugin: PluginWithOptions = (md, options = {}) => ) md.renderer.rules.icon = (tokens, idx, _, env: MarkdownEnv) => { - const { content, meta = {} } = tokens[idx] + const { content, meta } = tokens[idx] let icon = content + + /* istanbul ignore if -- @preserve */ if (meta.deprecated) { const [name, opt = ''] = content.split(' ') const [size, color] = opt.trim().split('/')