Archived
1
0
Fork 0

Added submodules with the spec and the mycology test suite

This commit is contained in:
Julien Dessaux 2021-10-07 18:24:48 +02:00
parent e1b1a60bde
commit 8daf3d58fc
5 changed files with 26 additions and 4 deletions

View file

@ -116,11 +116,11 @@ proc Load*(filename: string): ref Field =
f.lines.add(Line())
l = addr f.lines[^1]
trailingSpaces = 0
if i+1 < n:
if data[i] == '\r' and data[i+1] == '\n':
if data[i] == '\r':
if i+1 < n and data[i+1] == '\n':
inc i
else:
lastReadIsCR = true
else:
lastReadIsCR = true
else:
if data[i] == ' ':
if l.l == 0: # trim leading spaces