4 Commits
1.3.0 ... 1.3.1

Author SHA1 Message Date
Matt Nadareski
46d1fb7ca6 Bump version 2025-10-05 20:05:08 -04:00
Matt Nadareski
98617b9961 Fix test for fixed issue 2025-10-05 20:04:04 -04:00
Matt Nadareski
0573e4f180 Fix midpoint printing issue 2025-10-05 20:01:30 -04:00
Matt Nadareski
9ce9d1461e Add Nuget package link 2025-10-05 18:48:56 -04:00
4 changed files with 7 additions and 4 deletions

View File

@@ -6,6 +6,8 @@ This library contains logic to both parse commandlines using typed inputs as wel
All inputs allow for non-flag inputs in both `a=b` and `a b` formats. This allows for greater flexibility for cross-platform support. Flags for each input are fully defined by the implementer, so inputs of the form `-a`, `--a`, `/a`, and `a` are all accepted and can even be mixed. The only restriction is that flags should not end with the `=` character as it may interfere with default parsing.
Find the link to the Nuget package [here](https://www.nuget.org/packages/SabreTools.CommandLine).
For an example of a program implementing the library as well as the original source of this library code, see [SabreTools](https://github.com/SabreTools/SabreTools).
## Special Types

View File

@@ -95,7 +95,7 @@ namespace SabreTools.CommandLine.Test
[InlineData(0, -1, "a a")]
[InlineData(-1, 0, "a a")]
[InlineData(0, 0, "a a")]
[InlineData(2, 30, " a a")]
[InlineData(2, 30, " a a")]
[InlineData(4, 0, " a a")]
public void FormatStandardTest(int pre, int midpoint, string expected)
{

View File

@@ -699,13 +699,14 @@ namespace SabreTools.CommandLine.Inputs
{
var output = new StringBuilder();
output.Append(CreatePadding(pre));
output.Append(FormatFlags());
// Determine the midpoint padding size
int midpointPadding = midpoint > 0 && output.Length < midpoint
? midpoint - output.Length
: 1;
output.Append(CreatePadding(pre));
output.Append(FormatFlags());
output.Append(CreatePadding(midpointPadding));
output.Append(Description);

View File

@@ -11,7 +11,7 @@
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>1.3.0</Version>
<Version>1.3.1</Version>
<!-- Package Properties -->
<Authors>Matt Nadareski</Authors>