IndentedStringBuilder.AppendLine(string) doesnt append line terminator
XiaotianNetlift opened this issue · 1 comments
XiaotianNetlift commented
I'm submitting a...
Bug report (I searched for similar issues and did not find one)
Current behavior
IndentedStringBuilder.AppendLine(string text)
doesnt append line terminator at end, as one would expect.
Expected behavior
IndentedStringBuilder.AppendLine(string text)
should line terminator at end like StringBuilder
's counterpart.
Minimal reproduction of the problem with instructions
var builder = new StringBuilder();
builder.Append("hello ");
builder.AppendLine("uno");
builder.AppendLine("asd");
builder.AppendLine("asd");
Console.WriteLine($"===== {builder.GetType().Name} =====");
Console.WriteLine(builder.ToString());
var builder2 = new IndentedStringBuilder();
builder2.Append("hello ")
builder2.AppendLine("uno");
builder2.AppendLine("asd");
builder2.AppendLine("asd");
Console.WriteLine($"===== {builder2.GetType().Name} =====");
Console.WriteLine(builder2.ToString());
Output:
===== IndentedStringBuilder =====
hello unoasdasd
===== StringBuilder =====
hello uno
asd
asd
Environment
Nuget Package: Uno.Core
Package Version(s): 1.28.0
Affected platform(s):
- iOS
- Android
- WebAssembly
- Windows
- Build tasks
Visual Studio
- 2017 (version: )
- 2017 Preview (version: )
- for Mac (version: )
gahag commented
Documentation has been added to describe this behavior. We couldn't actually fix it because it would break other projects. I believe we can't do anything else to improve this, so this issue should be closed.