Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
fix import/export of nested named colors
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Aug 4, 2012
1 parent 0da19d4 commit c205964
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -638,7 +638,9 @@ bool FindSDColor(string sdKey, out IHighlightingItem item)
var highlighting = HighlightingManager.Instance.GetDefinition(language);
item = null;
if (def != null && highlighting != null) {
var color = def.Elements.OfType<XshdColor>().FirstOrDefault(i => i.Name == sdKey);
var visitor = new ColorVisitor(allSyntaxDefinitions);
def.AcceptElements(visitor);
var color = visitor.foundColors.FirstOrDefault(i => i.Name == sdKey);
if (color != null) {
item = new NamedColorHighlightingItem(defaultText, color) { ParentDefinition = highlighting };
item = new CustomizedHighlightingItem(customizationList, item, language);
Expand Down Expand Up @@ -746,8 +748,10 @@ bool FindSDColor(string sdKey, out IHighlightingItem item)
{ "XML CData Section", "XML.CData" },
{ "XML Comment", "XML.Comment" },
{ "XML Delimiter", "" },
{ "XML Doc Comment", "" },
{ "XML Doc Tag", "" },
{ "XML Doc Comment", "C#.DocComment" },
{ "XML Doc Tag", "C#.KnownDocTags" },
{ "XML Doc Comment", "VBNET.DocComment" },
{ "XML Doc Tag", "VBNET.KnownDocTags" },
{ "XML Name", "" },
{ "XML Text", "" },
};
Expand Down

0 comments on commit c205964

Please sign in to comment.