mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-18 00:48:35 +00:00
Don't segfault if the line is empty (#8906)
This commit is contained in:
@@ -87,9 +87,9 @@ proc endsWithOpr*(x: string): bool =
|
||||
result = x.endsWith(LineContinuationOprs)
|
||||
|
||||
proc continueLine(line: string, inTripleString: bool): bool {.inline.} =
|
||||
result = inTripleString or
|
||||
line[0] == ' ' or
|
||||
line.endsWith(LineContinuationOprs+AdditionalLineContinuationOprs)
|
||||
result = inTripleString or line.len > 0 and (
|
||||
line[0] == ' ' or
|
||||
line.endsWith(LineContinuationOprs+AdditionalLineContinuationOprs))
|
||||
|
||||
proc countTriples(s: string): int =
|
||||
var i = 0
|
||||
|
||||
Reference in New Issue
Block a user