From ffdcf1ae2a957c2a93c23059854d4574b320d0ab Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Wed, 10 Sep 2025 15:51:31 -0300 Subject: [PATCH] Align #:property Name=Value with RC syntax The final version is with an = sign. See https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives --- readme.md | 4 ++-- src/Demo/Humanizer.cs | 4 ++-- src/Demo/Mcp.cs | 4 ++-- src/SmallSharp/EmitTargets.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index 361d8d3..c997801 100644 --- a/readme.md +++ b/readme.md @@ -34,8 +34,8 @@ specified per file: ```csharp #:package Humanizer@2.14.1 -#:property ImplicitUsings true -#:property Nullable enable +#:property ImplicitUsings=true +#:property Nullable=enable using Humanizer; diff --git a/src/Demo/Humanizer.cs b/src/Demo/Humanizer.cs index 32b175e..a2e93ee 100644 --- a/src/Demo/Humanizer.cs +++ b/src/Demo/Humanizer.cs @@ -1,5 +1,5 @@ -#:property ImplicitUsings true -#:property Nullable enable +#:property ImplicitUsings=true +#:property Nullable=enable #:package Humanizer@2.14.1 using Humanizer; diff --git a/src/Demo/Mcp.cs b/src/Demo/Mcp.cs index 03f35f5..81e75bc 100644 --- a/src/Demo/Mcp.cs +++ b/src/Demo/Mcp.cs @@ -1,5 +1,5 @@ -#:property Title LaTeX to Image MCP -#:property Version 0.5.0 +#:property Title=LaTeX to Image MCP +#:property Version=0.5.0 #:package Smith@0.2.5 #:package DotNetConfig.Configuration@1.2.* #:package ModelContextProtocol@0.3.0-preview.* diff --git a/src/SmallSharp/EmitTargets.cs b/src/SmallSharp/EmitTargets.cs index 344aa43..051e6bb 100644 --- a/src/SmallSharp/EmitTargets.cs +++ b/src/SmallSharp/EmitTargets.cs @@ -15,7 +15,7 @@ public class EmitTargets : Task { static readonly Regex sdkExpr = new(@"^#:sdk\s+([^@]+?)(@(.+))?$"); static readonly Regex packageExpr = new(@"^#:package\s+([^@]+)@(.+)$"); - static readonly Regex propertyExpr = new(@"^#:property\s+([^\s]+)\s+(.+)$"); + static readonly Regex propertyExpr = new(@"^#:property\s+([^=]+)=(.+)$"); [Required] public required ITaskItem StartupFile { get; set; }