[fix] mathjax render (#532)

This commit is contained in:
星日语 2024-10-21 17:42:00 +08:00 committed by GitHub
parent d0f3ab8d48
commit 85eae414cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ module.exports = ctx => function(args, content) {
el += '>'
// title
if (title && title.length > 0) {
el += '<div class="title"><strong>' + title + '</strong></div>'
el += '<div class="title"><strong>' + ctx.render.renderSync({text: title, engine: 'markdown'}) + '</strong></div>'
}
// content
el += '<div class="body">'

View File

@ -39,7 +39,7 @@ module.exports = ctx => function(args, content) {
nodes.forEach((node, i) => {
el += '<details class="folder" index="' + (i) + '">'
// summary
el += '<summary><span>' + (node.header || '') + '</span></summary>'
el += '<summary>' + ctx.render.renderSync({text: (node.header || ''), engine: 'markdown'}) + '</summary>'
// content
el += '<div class="body">'
el += ctx.render.renderSync({text: (node.body || ''), engine: 'markdown'}).split('\n').join('')

View File

@ -20,7 +20,7 @@ module.exports = ctx => function(args, content) {
}
el += '>'
// summary
el += '<summary><span>' + (args.title || '') + '</span></summary>'
el += '<summary>' + ctx.render.renderSync({text: (args.title || ''), engine: 'markdown'}) + '</summary>'
// content
el += '<div class="body">'
el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')