Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2024-12-11 00:35:58 +08:00
commit 25d95bc69c
3 changed files with 4 additions and 2 deletions

View file

@ -67,7 +67,7 @@ func HTML2Markdown(htmlStr string, luteEngine *lute.Lute) (markdown string, with
}
func HTML2Tree(htmlStr string, luteEngine *lute.Lute) (tree *parse.Tree, withMath bool) {
htmlStr = util.RemoveInvalid(htmlStr)
htmlStr = gulu.Str.RemovePUA(htmlStr)
assetDirPath := filepath.Join(util.DataDir, "assets")
tree = luteEngine.HTML2Tree(htmlStr)
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {

View file

@ -1412,7 +1412,6 @@ func fullTextSearchCountByRegexp(exp, boxFilter, pathFilter, typeFilter, ignoreF
}
func fullTextSearchByFTS(query, boxFilter, pathFilter, typeFilter, ignoreFilter, orderBy string, beforeLen, page, pageSize int) (ret []*Block, matchedBlockCount, matchedRootCount int) {
query = stringQuery(query)
table := "blocks_fts" // 大小写敏感
if !Conf.Search.CaseSensitive {
table = "blocks_fts_case_insensitive"

View file

@ -38,6 +38,9 @@ var (
)
func GetTreeID(treePath string) string {
if strings.Contains(treePath, "\\") {
return strings.TrimSuffix(filepath.Base(treePath), ".sy")
}
return strings.TrimSuffix(path.Base(treePath), ".sy")
}