Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: An anomaly occurs when converting a list block to a paragraph and then undoing the action https://github.com/siyuan-note/siyuan/issues/18012

Danielcb8b9e432794
diff --git a/kernel/model/undolog.go b/kernel/model/undolog.go
index 7f615d55ce..6e6b814f19 100644
--- a/kernel/model/undolog.go
+++ b/kernel/model/undolog.go
@@ -438,7 +438,7 @@ func ResolveReplayDuplicateIds(tx *Transaction) {
// doDelete 会找不到节点而静默跳过,导致旧块残留并在重放后产生重复块。
// 典型场景:列表转段落后撤销——undo 先 delete 扁平化出的子块,再 insert 原列表
// (HTML 内联同一批子块 ID),这些子块会被前置 delete 清理,本不该参与冲突替换。
- // https://github.com/siyuan-note/siyuan/issues/18020
+ // https://github.com/siyuan-note/siyuan/issues/18012
if "insert" == op.Action {
if newID, ok := replacements[op.ID]; ok {
op.ID = newID