mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-30 01:00:27 +03:00
## Description Disk Markdown sync could not reliably sync Markdown files written outside AFFiNE: - A file containing a table failed to import (`invalid_projection`), because the table is an opaque block that the merge only accepts as a block marker. Unchanged opaque blocks are now matched through the checkpointed file body and passed to the merge as markers. Edits to an opaque block are still rejected. - Changes the Markdown source cannot carry, such as the collapsed state the editor sets on blocks, produced a review candidate for a hand-written file. They now leave the checkpointed file as it is. - Frontmatter: an empty block (`---` followed by `---`) and a closing delimiter at the end of the file were read as body text, YAML escapes such as `é` were kept literally, and keys AFFiNE does not sync (for example `aliases:`) were dropped on export. Unknown lines are now kept verbatim. - File names for non-ASCII titles fell back to `doc`. - The temporary file used while creating a Markdown file had a `.md` extension, so a leftover one was imported as a document. ## Verification - `cargo test -p affine_native --lib disk_sync` - `cargo clippy -p affine_native --all-targets --all-features -- -D warnings` - `rustfmt +nightly --check` on the changed files