Fix source spans after ignored first LF (#20209)
This commit is contained in:
1 parent
78f49dac02
commit
5a52a1019a
1 file changed
+4
@@ -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,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user