提交 a1a599e7 编写于 作者: P Petr Houska

Backported fix for #37584

上级 553503d9
......@@ -270,7 +270,13 @@ private static TextSpan GetSpanWithoutAttributes(SyntaxNode node, SyntaxNode roo
var endOfAttributeLists = attributeList.Last().Span.End;
var afterAttributesToken = root.FindTokenOnRightOfPosition(endOfAttributeLists);
return TextSpan.FromBounds(afterAttributesToken.Span.Start, node.Span.End);
var endOfNode = node.Span.End;
var startOfTokenAfterAttributes = afterAttributesToken.Span.Start;
var startOfNodeWithoutAttributes = endOfNode >= startOfTokenAfterAttributes
? afterAttributesToken.Span.Start
: endOfNode;
return TextSpan.FromBounds(startOfNodeWithoutAttributes, endOfNode);
}
return node.Span;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册