diff --git a/src/config/theme.ts b/src/config/theme.ts index 5de9a61..f21cec1 100644 --- a/src/config/theme.ts +++ b/src/config/theme.ts @@ -109,6 +109,7 @@ const defaultTheme: Theme = { 'markdown-alert-title': { 'display': `flex`, 'align-items': `center`, + 'gap': `0.5em`, }, // GFM 警告块内容,抵消 p 默认的 margin diff --git a/src/utils/MDAlert.ts b/src/utils/MDAlert.ts index 9028d2e..e53be83 100644 --- a/src/utils/MDAlert.ts +++ b/src/utils/MDAlert.ts @@ -81,7 +81,7 @@ export default function markedAlert(options: AlertOptions = {}): MarkedExtension name: `alert`, level: `block`, renderer({ meta, tokens = [] }) { - let tmpl = `
\n` + tmpl += `${this.parser.parse(tokens)}` + tmpl += `\n` return tmpl }, @@ -105,19 +105,19 @@ export default function markedAlert(options: AlertOptions = {}): MarkedExtension const defaultAlertVariant: AlertVariantItem[] = [ { type: `note`, - icon: ``, + icon: ``, }, { type: `tip`, - icon: ``, + icon: ``, }, { type: `important`, - icon: ``, + icon: ``, }, { type: `warning`, - icon: ``, + icon: ``, }, { type: `caution`,