Fix leading comment inside returned SequenceExpression (#1133)
This commit is contained in:
1 parent
bab9b5b93a
commit
d0666c3da4
3 files changed
+19
-1
No files matched your search
@@ -3255,7 +3255,6 @@ function hasLeadingOwnLineComment(text, node) {
|
||||
node.comments.some(
|
||||
comment =>
|
||||
comment.leading &&
|
||||
util.hasNewline(text, util.locStart(comment), { backwards: true }) &&
|
||||
util.hasNewline(text, util.locEnd(comment))
|
||||
);
|
||||
return res;
|
||||
|
||||
@@ -839,6 +839,12 @@ function sequenceExpression() {
|
||||
), b
|
||||
}
|
||||
|
||||
function sequenceExpressionInside() {
|
||||
return ( // Reason for a
|
||||
a, b
|
||||
);
|
||||
}
|
||||
|
||||
function taggedTemplate() {
|
||||
return (
|
||||
// Reason for a
|
||||
@@ -963,6 +969,13 @@ function sequenceExpression() {
|
||||
);
|
||||
}
|
||||
|
||||
function sequenceExpressionInside() {
|
||||
return (
|
||||
// Reason for a
|
||||
a, b
|
||||
);
|
||||
}
|
||||
|
||||
function taggedTemplate() {
|
||||
return (
|
||||
// Reason for a
|
||||
|
||||
@@ -100,6 +100,12 @@ function sequenceExpression() {
|
||||
), b
|
||||
}
|
||||
|
||||
function sequenceExpressionInside() {
|
||||
return ( // Reason for a
|
||||
a, b
|
||||
);
|
||||
}
|
||||
|
||||
function taggedTemplate() {
|
||||
return (
|
||||
// Reason for a
|
||||
|
||||
Reference in new issue
Block a user