Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Aug 10, 2023
1 parent 1af8bc7 commit a385c34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static GeneratorContext SemanticTransform(GeneratorAttributeSyntaxContex
if (attribute.ConstructorArguments.Length == 1)
{
// remove Assembly
if (name.StartsWith("Assembly"))
if (name.Length > 8 && name.StartsWith("Assembly"))
name = name.Substring(8);

// remove Attribute
Expand Down
1 change: 1 addition & 0 deletions src/AssemblyMetadata.Generators/AssemblyMetadataWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ private static string SafeName(string name)
private static string SafeValue(string value)
{
return value
.Replace("\\", "\\\\")
.Replace("\"", "\\\"")
.Replace(Environment.NewLine, "\\r\\n");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PropertyGroup Label="Package">
<Description>
Source generator for project and assembly information
as constants in the global "AssemblyMetadata" class
as constants in the global "AssemblyMetadata" \ class
</Description>
<Copyright>Copyright © $([System.DateTime]::Now.ToString(yyyy)) LoreSoft</Copyright>
<Authors>LoreSoft</Authors>
Expand Down

0 comments on commit a385c34

Please sign in to comment.