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
|
// opening tag
|
||||||
const summary = m[1] && m[1].trim()
|
const summary = m[1] && m[1].trim()
|
||||||
if (summary) {
|
if (summary) {
|
||||||
return `<details><summary>${md.utils.escapeHtml(summary)}</summary>\n`
|
return `<details><summary>${md.renderInline(summary)}</summary>\n`
|
||||||
} else {
|
} else {
|
||||||
return `<details>\n`
|
return `<details>\n`
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ md.use(markdownitContainer, 'spoiler', {
|
||||||
const partClass = `class="part raw" data-startline="${startline}" data-endline="${endline}"`
|
const partClass = `class="part raw" data-startline="${startline}" data-endline="${endline}"`
|
||||||
const summary = m[1] && m[1].trim()
|
const summary = m[1] && m[1].trim()
|
||||||
if (summary) {
|
if (summary) {
|
||||||
return `<details ${partClass}><summary>${md.utils.escapeHtml(summary)}</summary>\n`
|
return `<details ${partClass}><summary>${md.renderInline(summary)}</summary>\n`
|
||||||
} else {
|
} else {
|
||||||
return `<details ${partClass}>\n`
|
return `<details ${partClass}>\n`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue