Allan Leary f533329f77 Fix XML Beautify indentation after xmlns self-closing element
vkbeautify splits `<b xmlns="foo" />` into two fragments during
preprocessing. The `<b` fragment incorrectly incremented the indent
depth, but the corresponding decrement never fired because `/>` was
on the xmlns fragment, not a standalone self-closing token. Subsequent
siblings were therefore indented one level too deep.

Fix by moving the xmlns branch before the generic `/>` branch in the
if-else chain and decrementing depth when the xmlns fragment ends
with `/>`. The vkbeautify xml and createShiftArr functions are inlined
into XMLBeautify.mjs to avoid patching node_modules directly.

Fixes #2501

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 09:18:56 +01:00
..