Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-26 09:44:19 +08:00
parent 40ae99e278
commit 9010967b04
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 5 additions and 12 deletions

View file

@ -487,16 +487,16 @@ func exportMdContent(c *gin.Context) {
imgTag = arg["imgTag"].(bool)
}
addTitleMode := 0 // 0未指定遵循全局设置 Conf.Export.AddTitle1添加标题2不添加标题
addTitle := model.Conf.Export.AddTitle
if nil != arg["addTitle"] {
if arg["addTitle"].(bool) {
addTitleMode = 1
addTitle = true
} else {
addTitleMode = 2
addTitle = false
}
}
hPath, content := model.ExportMarkdownContent(id, refMode, embedMode, addTitleMode, yfm, fillCSSVar, adjustHeadingLevel, imgTag)
hPath, content := model.ExportMarkdownContent(id, refMode, embedMode, yfm, fillCSSVar, adjustHeadingLevel, imgTag, addTitle)
ret.Data = map[string]interface{}{
"hPath": hPath,
"content": content,