fix(editor,git-sync): parse details open as a boolean so open state survives render/round-trip

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
claude code agent 227
2026-06-26 18:01:39 +03:00
parent c90f9c0ef6
commit deb78dc1c9
4 changed files with 85 additions and 7 deletions

View File

@@ -470,7 +470,7 @@ const Details = Node.create({
return {
open: {
default: false,
parseHTML: (el: HTMLElement) => el.getAttribute("open"),
parseHTML: (el: HTMLElement) => el.hasAttribute("open"),
renderHTML: (attrs: Record<string, any>) =>
attrs.open ? { open: "" } : {},
},