Closed tig closed 4 years ago
Describe the bug
AnsiCte - text/plain
- [x] Zero length files should show as having one line.
- [x] One line files should show as having one line.
- [x] 1000 line files should show as having 1000 lines.
AnsiCte - text/ansi
- [x] Zero length files should show as having one line.
- [x] One line files should show as having one line.
- [x] 1000 line files should show as having 1000 lines.
Implemented a workaround for: https://github.com/pygments/pygments/issues/1435
if (!string.IsNullOrEmpty($"{file}.an") && File.Exists($"{file}.an")) {
Log.Debug("Reading {file}", $"{file}.an");
document = await File.ReadAllTextAsync($"{file}.an", Encoding.UTF8).ConfigureAwait(true);
// HACK: Because of this bug: https://github.com/pygments/pygments/issues/1435
if (document[^1] == '\n')
document = document.Remove(document.Length - 1, 1);
}
Describe the bug
AnsiCte - text/plain
AnsiCte - text/ansi