mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 17:59:30 +00:00
Fixed source file reporting in error messages including existing comments
This commit is contained in:
parent
aa945f9fd7
commit
ea19956f45
2 changed files with 2 additions and 2 deletions
|
|
@ -241,7 +241,7 @@ function candran.messageHandler(message)
|
|||
for l in originalFile:gmatch("([^\n]*)") do
|
||||
i = i +1
|
||||
if i == line then
|
||||
local extSource, lineMap = l:match("%-%- ([^:]-)%:(%d+)$")
|
||||
local extSource, lineMap = l:match(".*%-%- (.-)%:(%d+)$")
|
||||
if lineMap then
|
||||
if extSource ~= source then
|
||||
return indentation .. extSource .. ":" .. lineMap .. "(" .. extSource .. ":" .. line .. "):"
|
||||
|
|
|
|||
|
|
@ -3116,7 +3116,7 @@ for l in originalFile:gmatch("([^\
|
|||
]*)") do -- candran.can:241
|
||||
i = i + 1 -- candran.can:242
|
||||
if i == line then -- candran.can:243
|
||||
local extSource, lineMap = l:match("%-%- ([^:]-)%:(%d+)$") -- candran.can:244
|
||||
local extSource, lineMap = l:match(".*%-%- (.-)%:(%d+)$") -- candran.can:244
|
||||
if lineMap then -- candran.can:245
|
||||
if extSource ~= source then -- candran.can:246
|
||||
return indentation .. extSource .. ":" .. lineMap .. "(" .. extSource .. ":" .. line .. "):" -- candran.can:247
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue