Module:Module introspection: Difference between revisions
bugfix links to individual lines; remove comments so commented-out code is ignored |
bugfix comment removal |
||
| Line 13: | Line 13: | ||
local content = title:getContent() | local content = title:getContent() | ||
-- Remove | -- Remove multi-line comments first | ||
content = content:gsub("%-%-. | content = content:gsub("%-%-%[%[.-%]%]", "") | ||
-- Remove | -- Remove single-line comments after | ||
content = content:gsub("%-%- | content = content:gsub("%-%-.-\n", "\n") | ||
-- Get dependencies for that module | -- Get dependencies for that module | ||
| Line 89: | Line 89: | ||
local content = title:getContent() | local content = title:getContent() | ||
-- Remove | -- Remove multi-line comments first | ||
content = content:gsub("%-%-. | content = content:gsub("%-%-%[%[.-%]%]", "") | ||
-- Remove | -- Remove single-line comments after | ||
content = content:gsub("%-%- | content = content:gsub("%-%-.-\n", "\n") | ||
-- Iterate through file and find each function and the line found at | -- Iterate through file and find each function and the line found at | ||