Fix teaching.lua even more

This commit is contained in:
Thomas Avé 2023-08-28 19:16:52 +02:00
parent 3344c478ee
commit 5b532d8190
1 changed files with 11 additions and 2 deletions

View File

@ -12,14 +12,23 @@ local function should_load(path)
[4] = "third-party", [4] = "third-party",
[5] = "sfml", [5] = "sfml",
} }
local match = {
[1] = ".hpp",
[2] = ".h",
[3] = ".cpp",
[4] = ".c",
}
for _, pattern in ipairs(ignore) do for _, pattern in ipairs(ignore) do
if string.find(path, pattern, 0, true) then if string.find(path, pattern, 0, true) then
return false return false
end end
end end
if ends_with(path, ".h") or ends_with(path, ".cpp") or ends_with(path, ".cpp") or ends_with(path, ".cpp") then for _, pattern in ipairs(match) do
return true if ends_with(path, pattern) then
return true
end
end end
return false
end end
function teaching.load() function teaching.load()