diff --git a/ILSpy/Languages/CSharpLanguage.cs b/ILSpy/Languages/CSharpLanguage.cs index ae1ae033d..17ea5556d 100644 --- a/ILSpy/Languages/CSharpLanguage.cs +++ b/ILSpy/Languages/CSharpLanguage.cs @@ -759,7 +759,7 @@ namespace ICSharpCode.ILSpy color = gotoKeywordsColor; break; } - if (Roles.AttributeTargetRole == role) + if (nodeStack.PeekOrDefault() is AttributeSection) color = attributeKeywordsColor; if (color != null) { textOutput.BeginSpan(color);