C#C
C#4y ago
Doombox

Correctly reading tabs from text file. [Answered]

I have some Markdown files that are just this
- Some Item
  - Some Tabbed Item

and I'm reading them like this
if (!SemanticVersion.TryParse(file[path.Length..^3], out var semVer)) continue;
await using var stream = _assembly.GetManifestResourceStream(file);
if (stream is null) continue;
using var reader = new StreamReader(stream);
changelogs.Add(semVer, await reader.ReadToEndAsync());

however the tabbed items are having their tabs stripped from them and the output is just a bunch of strings split by \r\n, not sure how I'm supposed to read it correctly to preserve the tabs
Was this page helpful?