Preserve space between series order numbers
This commit is contained in:
parent
5b59b442ab
commit
4ea7f04921
@ -28,7 +28,7 @@ public class SeriesOrder : IFormattable
|
||||
while (TryParseNumber(order, out var value, out var range))
|
||||
{
|
||||
var prefix = order[..range.Start.Value];
|
||||
if(!string.IsNullOrWhiteSpace(prefix))
|
||||
if(!string.IsNullOrEmpty(prefix))
|
||||
parts.Add(prefix);
|
||||
|
||||
parts.Add(value);
|
||||
@ -36,7 +36,7 @@ public class SeriesOrder : IFormattable
|
||||
order = order[range.End.Value..];
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(order))
|
||||
if (!string.IsNullOrEmpty(order))
|
||||
parts.Add(order);
|
||||
|
||||
return new(parts.ToArray());
|
||||
|
||||
@ -418,6 +418,7 @@ namespace TemplatesTests
|
||||
[DataRow("<series#[F2]>", " f1g ", "f1.00g")]
|
||||
[DataRow("<series#[]>", "1", "1")]
|
||||
[DataRow("<series#>", "1", "1")]
|
||||
[DataRow("<series#>", " 1 6 ", "1 6")]
|
||||
public void SeriesOrder_formatters(string template, string seriesOrder, string expected)
|
||||
{
|
||||
var bookDto = GetLibraryBook();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user