mirror of https://github.com/status-im/codimd.git
Support inline markdown in spoiler summary
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
parent
42ae89cc72
commit
8f4ccb967d
|
@ -1124,7 +1124,7 @@ md.use(markdownitContainer, 'spoiler', {
|
|||
// opening tag
|
||||
const summary = m[1] && m[1].trim()
|
||||
if (summary) {
|
||||
return `<details><summary>${md.utils.escapeHtml(summary)}</summary>\n`
|
||||
return `<details><summary>${md.renderInline(summary)}</summary>\n`
|
||||
} else {
|
||||
return `<details>\n`
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ md.use(markdownitContainer, 'spoiler', {
|
|||
const partClass = `class="part raw" data-startline="${startline}" data-endline="${endline}"`
|
||||
const summary = m[1] && m[1].trim()
|
||||
if (summary) {
|
||||
return `<details ${partClass}><summary>${md.utils.escapeHtml(summary)}</summary>\n`
|
||||
return `<details ${partClass}><summary>${md.renderInline(summary)}</summary>\n`
|
||||
} else {
|
||||
return `<details ${partClass}>\n`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue