Print dangling on ast on all the paths
parent
7abd6f5f9b
commit
b42e865c61
|
@ -168,8 +168,8 @@ function attach(comments, ast, text) {
|
|||
} else if (enclosingNode) {
|
||||
addDanglingComment(enclosingNode, comment);
|
||||
} else {
|
||||
// TODO: If there are no nodes at all, we should still somehow
|
||||
// print the comment.
|
||||
// There are no nodes, let's attach it to the root of the ast
|
||||
addDanglingComment(ast, comment);
|
||||
}
|
||||
} else {
|
||||
// Otherwise, text exists both before and after the comment on
|
||||
|
@ -193,8 +193,8 @@ function attach(comments, ast, text) {
|
|||
} else if (enclosingNode) {
|
||||
addDanglingComment(enclosingNode, comment);
|
||||
} else {
|
||||
// TODO: If there are no nodes at all, we should still somehow
|
||||
// print the comment.
|
||||
// There are no nodes, let's attach it to the root of the ast
|
||||
addDanglingComment(ast, comment);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue