芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/optimyar/wp-content/plugins/code-snippets/js/utils/shortcodes.ts
export type ShortcodeAtts = Record
export const buildShortcodeTag = (tag: string, atts: ShortcodeAtts): string => `[${[ tag, ...Object.entries(atts) .filter(([, value]) => Boolean(value)) .map(([att, value]) => 'boolean' === typeof value ? att : `${att}=${JSON.stringify(value)}`) ].filter(Boolean).join(' ')}]`