v2.1.1
Fixed
- Code-block input rule loses the
languageattribute (#113) — Typing```<lang>+ space converts a paragraph to acode_blockvia a single transaction containing bothdeleteTextandsetBlockType. TheTextDirectionAutoPlugin's auto-detect middleware appended its ownsetNodeAttrstep built from a pre-transactionblock.attrssnapshot;applySetNodeAttrhas full-replace semantics, so by application time the snapshot was stale and clobbered the{ language, backgroundColor }attrs written bysetBlockType. The result was a code block withlanguage: '', no language label and no syntax highlighting. Auto-detect now pre-scans the transaction for blocks already targeted bysetBlockTypeorsetNodeAttrand skips its emission for those blocks — symmetrical to the guards already present in thepreserve-dirandinherit-dirmiddlewares. The next text-only transaction re-detects direction normally. Generally fixes the same data-loss pattern for any future input rule or command that combines text edits with a block-type or attr change in a single atomic transaction.
Full Changelog: v2.1.0...v2.1.1