mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Database primary key anchor text supports line breaks https://github.com/siyuan-note/siyuan/issues/13624
This commit is contained in:
parent
6125603e38
commit
07cd4ec0b5
5 changed files with 23 additions and 13 deletions
|
|
@ -103,14 +103,16 @@ func renderOutline(heading *ast.Node, luteEngine *lute.Lute) (ret string) {
|
|||
return
|
||||
}
|
||||
|
||||
func renderBlockText(node *ast.Node, excludeTypes []string) (ret string) {
|
||||
func renderBlockText(node *ast.Node, excludeTypes []string, removeLineBreak bool) (ret string) {
|
||||
if nil == node {
|
||||
return
|
||||
}
|
||||
|
||||
ret = sql.NodeStaticContent(node, excludeTypes, false, false, false)
|
||||
ret = strings.TrimSpace(ret)
|
||||
ret = strings.ReplaceAll(ret, "\n", "")
|
||||
if removeLineBreak {
|
||||
ret = strings.ReplaceAll(ret, "\n", "")
|
||||
}
|
||||
ret = util.UnescapeHTML(ret)
|
||||
ret = util.EscapeHTML(ret)
|
||||
ret = strings.TrimSpace(ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue