Skip to content

Commit

Permalink
! Simplified code
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed May 18, 2023
1 parent e7854a0 commit 2eed378
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Codist/SyntaxHighlight/FormatStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -780,28 +780,28 @@ static void Print(ResourceDictionary resource, StringBuilder sb) {
foreach (var key in resource.Keys) {
var val = resource[key];
switch (key.ToString()) {
case ClassificationFormatDefinition.ForegroundBrushId:
case EditorFormatDefinition.ForegroundBrushId:
sb.Append(val).Append("@f");
break;
case ClassificationFormatDefinition.ForegroundColorId:
if (resource.Contains(ClassificationFormatDefinition.ForegroundBrushId)) {
case EditorFormatDefinition.ForegroundColorId:
if (resource.Contains(EditorFormatDefinition.ForegroundBrushId)) {
break;
}
goto case ClassificationFormatDefinition.ForegroundBrushId;
goto case EditorFormatDefinition.ForegroundBrushId;
case ClassificationFormatDefinition.IsBoldId:
sb.Append((bool)val ? "+B" : "-B");
break;
case ClassificationFormatDefinition.IsItalicId:
sb.Append((bool)val ? "+I" : "-I");
break;
case ClassificationFormatDefinition.BackgroundBrushId:
case EditorFormatDefinition.BackgroundBrushId:
sb.Append(val).Append("@b");
break;
case ClassificationFormatDefinition.BackgroundColorId:
if (resource.Contains(ClassificationFormatDefinition.BackgroundBrushId)) {
case EditorFormatDefinition.BackgroundColorId:
if (resource.Contains(EditorFormatDefinition.BackgroundBrushId)) {
break;
}
goto case ClassificationFormatDefinition.BackgroundBrushId;
goto case EditorFormatDefinition.BackgroundBrushId;
case ClassificationFormatDefinition.FontRenderingSizeId:
sb.Append(val).Append('#');
break;
Expand Down

0 comments on commit 2eed378

Please sign in to comment.