自动添加标题

This commit is contained in:
2025-04-27 22:03:55 +08:00
parent a41ba2e85a
commit 69c3a36957
3 changed files with 10 additions and 3 deletions

View File

@@ -120,7 +120,8 @@ async function prepare() {
async function getContent() {
const data = await Tutorial.get(step.value)
taskId.value = data.task_ptr
content.value = await marked.parse(data.content, { async: true })
const merged = `# #${data.display} ${data.title}\n${data.content}`
content.value = await marked.parse(merged, { async: true })
}
// 用 js 来写的,可以换成 vue 的方式