Fix teaching.lua even more
This commit is contained in:
parent
3344c478ee
commit
5b532d8190
|
@ -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
|
||||||
|
if ends_with(path, pattern) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function teaching.load()
|
function teaching.load()
|
||||||
|
|
Loading…
Reference in New Issue