mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-16 20:18:06 +01:00
🔥 表 blocks 新增 fmarkdown 字段 https://github.com/siyuan-note/siyuan/issues/5720
This commit is contained in:
parent
51eedd11eb
commit
f9befd8d13
8 changed files with 97 additions and 101 deletions
|
|
@ -331,6 +331,8 @@ func fullTextSearchCount(query, box, path, filter string) (matchedBlockCount, ma
|
|||
}
|
||||
|
||||
func fullTextSearch(query, box, path, filter string, beforeLen int, querySyntax bool) (ret []*Block, matchedBlockCount, matchedRootCount int) {
|
||||
fullTextSearchHistory(query, 1)
|
||||
|
||||
query = gulu.Str.RemoveInvisible(query)
|
||||
if util.IsIDPattern(query) {
|
||||
ret, matchedBlockCount, matchedRootCount = searchBySQL("SELECT * FROM `blocks` WHERE `id` = '"+query+"'", beforeLen)
|
||||
|
|
@ -490,21 +492,20 @@ func fromSQLBlock(sqlBlock *sql.Block, terms string, beforeLen int) (block *Bloc
|
|||
markdown := maxContent(sqlBlock.Markdown, 5120)
|
||||
|
||||
block = &Block{
|
||||
Box: sqlBlock.Box,
|
||||
Path: p,
|
||||
ID: id,
|
||||
RootID: sqlBlock.RootID,
|
||||
ParentID: sqlBlock.ParentID,
|
||||
Alias: sqlBlock.Alias,
|
||||
Name: sqlBlock.Name,
|
||||
Memo: sqlBlock.Memo,
|
||||
Tag: sqlBlock.Tag,
|
||||
Content: content,
|
||||
FContent: sqlBlock.FContent,
|
||||
Markdown: markdown,
|
||||
FMarkdown: sqlBlock.FMarkdown,
|
||||
Type: treenode.FromAbbrType(sqlBlock.Type),
|
||||
SubType: sqlBlock.SubType,
|
||||
Box: sqlBlock.Box,
|
||||
Path: p,
|
||||
ID: id,
|
||||
RootID: sqlBlock.RootID,
|
||||
ParentID: sqlBlock.ParentID,
|
||||
Alias: sqlBlock.Alias,
|
||||
Name: sqlBlock.Name,
|
||||
Memo: sqlBlock.Memo,
|
||||
Tag: sqlBlock.Tag,
|
||||
Content: content,
|
||||
FContent: sqlBlock.FContent,
|
||||
Markdown: markdown,
|
||||
Type: treenode.FromAbbrType(sqlBlock.Type),
|
||||
SubType: sqlBlock.SubType,
|
||||
}
|
||||
if "" != sqlBlock.IAL {
|
||||
block.IAL = map[string]string{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue