Skip to content

Commit 619db4b

Browse files
committed
fixes #265 fixes #264
1 parent 28849bc commit 619db4b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

moonscript/cmd/coverage.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ position_to_lines = function(file_content, positions)
4242
end
4343
local format_file
4444
format_file = function(fname, positions)
45+
fname = fname:gsub("^@", "")
4546
local file = assert(io.open(fname))
4647
local content = file:read("*a")
4748
file:close()

moonscript/cmd/coverage.moon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ position_to_lines = (file_content, positions) ->
2323
lines
2424

2525
format_file = (fname, positions) ->
26+
-- sources have @ in front of file names
27+
fname = fname\gsub "^@", ""
28+
2629
file = assert io.open fname
2730
content = file\read "*a"
2831
file\close!

0 commit comments

Comments
 (0)