Skip to content

Commit 613c547

Browse files
author
matthaw
committed
Corrected color bleeding after "class" arbitrarily within code.
1 parent c985933 commit 613c547

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

ColorCode.AcceptanceTests/ColorCode.AcceptanceTests.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<DefineConstants>DEBUG;TRACE</DefineConstants>
2222
<ErrorReport>prompt</ErrorReport>
2323
<WarningLevel>4</WarningLevel>
24+
<PlatformTarget>AnyCPU</PlatformTarget>
2425
</PropertyGroup>
2526
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2627
<DebugType>pdbonly</DebugType>
@@ -69,6 +70,9 @@
6970
<None Include="Data\csharp\comments.source.cs">
7071
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7172
</None>
73+
<None Include="Data\csharp\correct-classname.source.cs">
74+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
75+
</None>
7276
<Compile Include="Data\csharp\linq-keyword.source.cs">
7377
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7478
</Compile>
@@ -162,6 +166,9 @@
162166
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
163167
</Content>
164168
<Content Include="Data\csharp\comments.expected.html" />
169+
<Content Include="Data\csharp\correct-classname.expected.html">
170+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
171+
</Content>
165172
<Content Include="Data\csharp\linq-keyword.expected.html">
166173
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
167174
</Content>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div style="color:Black;background-color:White;"><pre>
2+
<span style="color:Blue;">public</span> <span style="color:Blue;">class</span><span style="color:MediumTurquoise;"> IntermediateProject :
3+
IIntermediateProject,
4+
IAttributeDeclarationTarget
5+
</span>{
6+
<span style="color:Blue;">#region</span> IntermediateProject data members.
7+
<span style="color:Gray;">///</span> <span style="color:Gray;">&lt;summary&gt;</span>
8+
<span style="color:Gray;">///</span><span style="color:Green;"> Data member for &lt;see cref=&quot;Classes&quot;/&gt;.</span>
9+
<span style="color:Gray;">///</span> <span style="color:Gray;">&lt;/summary&gt;</span>
10+
<span style="color:Blue;">private</span> IClassTypes classes;
11+
<span style="color:Gray;">///</span> <span style="color:Gray;">&lt;summary&gt;</span>
12+
<span style="color:Gray;">///</span><span style="color:Green;"> Data member for &lt;see cref=&quot;Delegates&quot;/&gt;.</span>
13+
<span style="color:Gray;">///</span> <span style="color:Gray;">&lt;/summary&gt;</span>
14+
<span style="color:Blue;">private</span> IDelegateTypes delegates;
15+
<span style="color:Blue;">#endregion</span>
16+
}
17+
</pre></div>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
public class IntermediateProject :
2+
IIntermediateProject,
3+
IAttributeDeclarationTarget
4+
{
5+
#region IntermediateProject data members.
6+
/// <summary>
7+
/// Data member for <see cref="Classes"/>.
8+
/// </summary>
9+
private IClassTypes classes;
10+
/// <summary>
11+
/// Data member for <see cref="Delegates"/>.
12+
/// </summary>
13+
private IDelegateTypes delegates;
14+
#endregion
15+
}

ColorCode/Compilation/Languages/CSharp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public IList<LanguageRule> Rules
8989
{ 1, ScopeName.Keyword }
9090
}),
9191
new LanguageRule(
92-
@"(class|interface)([^{]+?){",
92+
@"\b(class|interface)\b([^{]+?){",
9393
new Dictionary<int, string>
9494
{
9595
{ 1, ScopeName.Keyword },

0 commit comments

Comments
 (0)