mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 11:00:52 +08:00
🎨 Improve breadcrumb escape text Fix https://github.com/siyuan-note/siyuan/issues/8679
This commit is contained in:
parent
886b5fdc8c
commit
ca24c4a9bc
@ -18,7 +18,6 @@ package model
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
@ -260,7 +259,6 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string) (ret []*BlockPa
|
|||||||
|
|
||||||
headingLevel := 16
|
headingLevel := 16
|
||||||
maxNameLen := 1024
|
maxNameLen := 1024
|
||||||
boxName := box.Name
|
|
||||||
var hPath string
|
var hPath string
|
||||||
baseBlock := treenode.GetBlockTreeRootByPath(node.Box, node.Path)
|
baseBlock := treenode.GetBlockTreeRootByPath(node.Box, node.Path)
|
||||||
if nil != baseBlock {
|
if nil != baseBlock {
|
||||||
@ -278,7 +276,7 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string) (ret []*BlockPa
|
|||||||
|
|
||||||
name := util.EscapeHTML(parent.IALAttr("name"))
|
name := util.EscapeHTML(parent.IALAttr("name"))
|
||||||
if ast.NodeDocument == parent.Type {
|
if ast.NodeDocument == parent.Type {
|
||||||
name = util.EscapeHTML(path.Join(boxName, hPath))
|
name = util.EscapeHTML(box.Name) + util.EscapeHTML(hPath)
|
||||||
} else {
|
} else {
|
||||||
if "" == name {
|
if "" == name {
|
||||||
if ast.NodeListItem == parent.Type {
|
if ast.NodeListItem == parent.Type {
|
||||||
|
Loading…
Reference in New Issue
Block a user