diff --git a/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs b/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs index d3b9bb84..e973324a 100644 --- a/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs +++ b/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs @@ -6817,7 +6817,7 @@ private void WithAttributes(NamedDecl namedDecl, bool onlySupportedOSPlatform = case CX_AttrKind_Annotate: { - var annotationText = attr.Spelling; + var annotationText = EscapeString(attr.Spelling); outputBuilder.WriteCustomAttribute($"""NativeAnnotation("{annotationText}")"""); break; }