really fix comment attachment

This commit is contained in:
Sebastian McKenzie 2015-07-26 21:58:22 +01:00
parent d7f59180ce
commit c5a407f457

View File

@ -74,7 +74,7 @@ pp.processComment = function (node) {
if (lastChild) { if (lastChild) {
if (lastChild.leadingComments) { if (lastChild.leadingComments) {
if (last(lastChild.leadingComments).end < node.start) { if (lastChild !== node && last(lastChild.leadingComments).end <= node.start) {
node.leadingComments = lastChild.leadingComments; node.leadingComments = lastChild.leadingComments;
lastChild.leadingComments = null; lastChild.leadingComments = null;
} else { } else {