From ad5cc38488473cf994ee1b4948cad9d4e908077a Mon Sep 17 00:00:00 2001 From: Manodasan Wignarajah Date: Wed, 2 Oct 2024 21:34:48 -0700 Subject: [PATCH] Escape a couple more special characters (#1807) * Add more special characters for escaping * 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 459de7cab..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