We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38a318b commit 770e653Copy full SHA for 770e653
src/LineNumbers.jl
@@ -17,7 +17,7 @@ function SourceFile(data::AbstractString)
17
line = readuntil(buf,'\n')
18
!eof(buf) && push!(offsets, position(buf))
19
end
20
- if !isempty(offsets) && line[end] == '\n'
+ if !isempty(offsets) && !isempty(line) && line[end] == '\n'
21
push!(offsets, position(buf))
22
23
SourceFile(copy(codeunits(data)), offsets)
0 commit comments