Fix source spans after ignored first LF (#20209)

This commit is contained in:
Максим Иванов authored and GitHub committed 2026-10-03 03:02:49 +08:00
1 parent 78f49dac02
commit 5a52a1019a
1 file changed
+4
+4
View File
@@ -48,6 +48,10 @@ function removeIgnorableFirstLf(ast /* , options */) {
node.removeChild(text); node.removeChild(text);
} else { } else {
text.value = text.value.slice(1); text.value = text.value.slice(1);
text.sourceSpan = new ParseSourceSpan(
text.sourceSpan.start.moveBy(1),
text.sourceSpan.end,
);
} }
} }
}); });