Fixes maxLineLength's bug in the renderer (#8240)
This commit is contained in:
parent
3b310e91cd
commit
854aa3958f
1 changed files with 3 additions and 3 deletions
|
|
@ -189,7 +189,7 @@ proc putComment(g: var TSrcGen, s: string) =
|
||||||
put(g, tkComment, com)
|
put(g, tkComment, com)
|
||||||
com = "## "
|
com = "## "
|
||||||
inc(i)
|
inc(i)
|
||||||
if i < s.len and s[i] == '\x0A': inc(i)
|
if i <= hi and s[i] == '\x0A': inc(i)
|
||||||
optNL(g, ind)
|
optNL(g, ind)
|
||||||
of '\x0A':
|
of '\x0A':
|
||||||
put(g, tkComment, com)
|
put(g, tkComment, com)
|
||||||
|
|
@ -226,7 +226,7 @@ proc maxLineLength(s: string): int =
|
||||||
break
|
break
|
||||||
of '\x0D':
|
of '\x0D':
|
||||||
inc(i)
|
inc(i)
|
||||||
if s[i] == '\x0A': inc(i)
|
if i <= hi and s[i] == '\x0A': inc(i)
|
||||||
result = max(result, lineLen)
|
result = max(result, lineLen)
|
||||||
lineLen = 0
|
lineLen = 0
|
||||||
of '\x0A':
|
of '\x0A':
|
||||||
|
|
@ -247,7 +247,7 @@ proc putRawStr(g: var TSrcGen, kind: TTokType, s: string) =
|
||||||
put(g, kind, str)
|
put(g, kind, str)
|
||||||
str = ""
|
str = ""
|
||||||
inc(i)
|
inc(i)
|
||||||
if (i <= hi) and (s[i] == '\x0A'): inc(i)
|
if i <= hi and s[i] == '\x0A': inc(i)
|
||||||
optNL(g, 0)
|
optNL(g, 0)
|
||||||
of '\x0A':
|
of '\x0A':
|
||||||
put(g, kind, str)
|
put(g, kind, str)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue