Download Latest Version 1.2.6 source code.tar.gz (939.3 kB)
Email in envelope

Get an email when there's a new version of CSharpier

Home / 1.2.6
Name Modified Size InfoDownloads / Week
Parent folder
csharpier.1.2.6.nupkg 2026-02-06 21.1 MB
1.2.6 source code.tar.gz 2026-02-06 939.3 kB
1.2.6 source code.zip 2026-02-06 1.3 MB
README.md 2026-02-06 1.9 kB
Totals: 4 Items   23.3 MB 0

What's Changed

[Bug]: XML with DOCTYPE results in "invalid xml" warning #1809

CSharpier was not formatting xml that included a doctype and instead reporting that it was invalid xml.

:::xml
<?xml version="1.0"?>
<!DOCTYPE staff SYSTEM "staff.dtd"[
    <!ENTITY ent1 "es">
]>
<staff></staff>

[Bug]: Initializing a span using stackalloc leads to different formatting compared to new #1808

When initializing a spacn using stackalloc, it was not being formatting consistently with other code

:::c#
// input & expected output
Span<int> metatable = new int[]
{
    00000000000000000000000001,
    00000000000000000000000002,
    00000000000000000000000003,
};

Span<int> metatable = stackalloc int[]
{
    00000000000000000000000001,
    00000000000000000000000002,
    00000000000000000000000003,
};

// 1.2.5
Span<int> metatable = new int[]
{
    00000000000000000000000001,
    00000000000000000000000002,
    00000000000000000000000003,
};

Span<int> metatable =
    stackalloc int[] {
        00000000000000000000000001,
        00000000000000000000000002,
        00000000000000000000000003,
    };

[Bug]: Comments in otherwise empty object pattern disappear when formatting #1804

CSharpier was removing comments if they were the only content of an object pattern.

:::c#
// input & expected output
var match = obj is {
    //Property: 123
};

// 1.2.5
var match = obj is { };

Full Changelog: https://github.com/belav/csharpier/compare/1.2.5...1.2.6

Source: README.md, updated 2026-02-06