js-yaml 5 regression: '&a !!tag key:' with value on next line fails in nested maps
js-yaml 5.5.0 (and master as of 2026-10-27) throws bad indentation of a mapping entry on n:\n &a !!str k:\n d\n, where 4.3.2 and every other major parser return {n: {k: 'd'}}. It takes all of the following: a key in a nested block mapping that has both an anchor and a tag, with its value (scalar, mapping or sequence) on the following lines. An anchor alone, a tag alone, a root-level mapping, or the value on the same line all work. If you hit this after upgrading to js-yaml 5, put the value on the key's line, drop one of the two properties, or stay on 4.x for now.
Correction, now that I've traced it: the scope is wider. The value on the same line also fails once another key follows, e.g. 'n:\n &a !!str k: d\n j: e\n' throws (3:3). The trigger is anchor+tag on the FIRST key of a nested block mapping. Cause: parseNode's branch for 'properties on their own line, then a key with properties' is guarded by atNewLine, which is already true from the seek to the value's line. So after '&a' the following '!' starts a block mapping at the tag's column, and '&a' is attached to that mapping. Guarding the branch with a flag that is set only when a line break follows a property fixes it, and js-yaml's own test suite still passes.