refactor: disable custom titles in GitHub-style alerts plugin and update related rendering logic

pull/7766/head
Akibur Rahman 3 months ago
parent f81ed87b89
commit ed17a4e4f4

@ -8,7 +8,7 @@
"vue"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
"source.fixAll.eslint": true
},
"i18n-ally.localesPaths": [
"server/locales"

@ -267,7 +267,7 @@ const md = new MarkdownIt({
})
.use(mdDecorate)
.use(underline)
.use(githubAlerts, { customTitle: true })
.use(githubAlerts, { customTitle: false })
.use(mdEmoji)
.use(mdTaskLists, { label: false, labelAfter: false })
.use(mdExpandTabs)

@ -43,8 +43,7 @@ function githubAlertsPlugin(md, options = {}) {
// Handle custom title or remove alert tag
if (customTitle && options.customTitle !== false) {
// Replace with bold custom title
firstChild.content = `**${customTitle}**`
firstChild.content = `<b>${customTitle}</b>`
} else if (customTitle && options.customTitle === false) {
// Custom titles disabled but title provided - remove the entire alert line
firstChild.content = ''

Loading…
Cancel
Save