From 39d0ed69e9fb9a08c629fd944cd04c7681c38f1a Mon Sep 17 00:00:00 2001 From: Manodasan Wignarajah Date: Wed, 2 Oct 2024 18:24:25 -0700 Subject: [PATCH 1/2] Add more special characters for escaping --- src/Authoring/WinRT.SourceGenerator/Helper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Authoring/WinRT.SourceGenerator/Helper.cs b/src/Authoring/WinRT.SourceGenerator/Helper.cs index 459de7cab..d2b5ef20b 100644 --- a/src/Authoring/WinRT.SourceGenerator/Helper.cs +++ b/src/Authoring/WinRT.SourceGenerator/Helper.cs @@ -1045,7 +1045,7 @@ public static string GetAbiMarshalerType(string type, string abiType, TypeKind k public static string EscapeTypeNameForIdentifier(string typeName) { - return Regex.Replace(typeName, """[(\ |:<>,\.\-@)]""", "_"); + return Regex.Replace(typeName, """[(\ |:<>,\.\-@;+'^!)]""", "_"); } public readonly struct MappedType From 4a2c7eba04269e5de90959099fa43b7ef96cb191 Mon Sep 17 00:00:00 2001 From: Manodasan Wignarajah Date: Wed, 2 Oct 2024 18:32:51 -0700 Subject: [PATCH 2/2] One more special character --- build/AzurePipelineTemplates/CsWinRT-Variables.yml | 2 +- src/Authoring/WinRT.SourceGenerator/Helper.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/AzurePipelineTemplates/CsWinRT-Variables.yml b/build/AzurePipelineTemplates/CsWinRT-Variables.yml index 387c9279f..843dad457 100644 --- a/build/AzurePipelineTemplates/CsWinRT-Variables.yml +++ b/build/AzurePipelineTemplates/CsWinRT-Variables.yml @@ -5,7 +5,7 @@ variables: - name: MinorVersion value: 1 - name: PatchVersion - value: 4 + value: 5 - name: WinRT.Runtime.AssemblyVersion value: '2.1.0.0' - name: Net5.SDK.Feed diff --git a/src/Authoring/WinRT.SourceGenerator/Helper.cs b/src/Authoring/WinRT.SourceGenerator/Helper.cs index d2b5ef20b..3b877af1d 100644 --- a/src/Authoring/WinRT.SourceGenerator/Helper.cs +++ b/src/Authoring/WinRT.SourceGenerator/Helper.cs @@ -1045,7 +1045,7 @@ public static string GetAbiMarshalerType(string type, string abiType, TypeKind k public static string EscapeTypeNameForIdentifier(string typeName) { - return Regex.Replace(typeName, """[(\ |:<>,\.\-@;+'^!)]""", "_"); + return Regex.Replace(typeName, """[(\ |:<>,\.\-@;+'^!`)]""", "_"); } public readonly struct MappedType