Skip to content

Commit

Permalink
Fix #94
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekkonnect committed Jan 8, 2025
1 parent 4a2aa25 commit 7e9e792
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Syndiesis/Controls/Editor/VisualBasicRoslynColorizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,16 @@ private void ColorizeTokenInLine(DocumentLine line, SyntaxToken token)

if (tokenKind is SyntaxKind.XmlNameToken)
{
var nameParent = tokenParent.Parent!;
var nameParentKind = nameParent.Kind();
var nameParent = tokenParent.Parent;
var nameParentKind = nameParent?.Kind();
switch (nameParentKind)
{
case SyntaxKind.XmlAttribute:
return ColorizerForBrush(Styles.XmlAttributeBrush);

case SyntaxKind.XmlElementStartTag:
case SyntaxKind.XmlElementEndTag:
case null:
return ColorizerForBrush(Styles.XmlTagBrush);
}
}
Expand Down

0 comments on commit 7e9e792

Please sign in to comment.