Skip to content

Commit 67b17ed

Browse files
Added Build.Bat, Added "csharp" alias (fixes #1), made it easier to use RichTextBlockFormatter.
1 parent 22f0123 commit 67b17ed

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

ColorCode.Core/Compilation/Languages/CSharp.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public bool HasAlias(string lang)
116116
{
117117
case "cs":
118118
case "c#":
119+
case "csharp":
119120
case "cake":
120121
return true;
121122

ColorCode.UWP/RichTextBlockFormatter.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,20 @@ namespace ColorCode
1515
/// </summary>
1616
public class RichTextBlockFormatter : CodeColorizerBase
1717
{
18+
/// <summary>
19+
/// Creates a <see cref="RichTextBlockFormatter"/>, for rendering Syntax Highlighted code to a RichTextBlock.
20+
/// </summary>
21+
/// <param name="Theme">The Theme to use, determines whether to use Default Light or Default Dark.</param>
22+
public RichTextBlockFormatter(ElementTheme Theme, ILanguageParser languageParser = null) : this(Theme == ElementTheme.Dark ? StyleDictionary.DefaultDark : StyleDictionary.DefaultLight, languageParser)
23+
{
24+
}
25+
1826
/// <summary>
1927
/// Creates a <see cref="RichTextBlockFormatter"/>, for rendering Syntax Highlighted code to a RichTextBlock.
2028
/// </summary>
2129
/// <param name="Style">The Custom styles to Apply to the formatted Code.</param>
2230
/// <param name="languageParser">The language parser that the <see cref="RichTextBlockFormatter"/> instance will use for its lifetime.</param>
23-
public RichTextBlockFormatter(ElementTheme Theme = ElementTheme.Default, StyleDictionary Style = null, ILanguageParser languageParser = null) : base(Theme == ElementTheme.Dark ? Style ?? StyleDictionary.DefaultDark : Style, languageParser)
31+
public RichTextBlockFormatter(StyleDictionary Style = null, ILanguageParser languageParser = null) : base(Style, languageParser)
2432
{
2533
}
2634

build/Build.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@ECHO OFF
2+
PowerShell.exe -file build.ps1
3+
PAUSE

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.0.2",
2+
"version": "2.0.3",
33
"publicReleaseRefSpec": [
44
"^refs/heads/master$", // we release out of master
55
"^refs/heads/rel/\\d+\\.\\d+\\.\\d+" // we also release branches starting with rel/N.N.N

0 commit comments

Comments
 (0)