mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-03 06:01:47 +01:00
🐛 索引嵌入块内容可能会导致内核崩溃 https://github.com/siyuan-note/siyuan/issues/7213
This commit is contained in:
parent
7aea03db69
commit
70e2cd3987
2 changed files with 12 additions and 4 deletions
|
|
@ -197,6 +197,10 @@ func autoIndexEmbedBlock(embedBlocks []*sql.Block) {
|
|||
for i, embedBlock := range embedBlocks {
|
||||
stmt := strings.TrimPrefix(embedBlock.Markdown, "{{")
|
||||
stmt = strings.TrimSuffix(stmt, "}}")
|
||||
if !strings.Contains(strings.ToLower(stmt), "select") {
|
||||
continue
|
||||
}
|
||||
|
||||
queryResultBlocks := sql.SelectBlocksRawStmtNoParse(stmt, 102400)
|
||||
for _, block := range queryResultBlocks {
|
||||
embedBlock.Content += block.Content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue