Module:Module introspection: Difference between revisions

Ganaram inukshuk (talk | contribs)
bugfix links to individual lines; remove comments so commented-out code is ignored
Ganaram inukshuk (talk | contribs)
bugfix comment removal
Line 13: Line 13:
local content = title:getContent()
local content = title:getContent()
-- Remove single-line comments
-- Remove multi-line comments first
content = content:gsub("%-%-.*", "")
content = content:gsub("%-%-%[%[.-%]%]", "")
-- Remove multi-line comments
-- 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 single-line comments
-- Remove multi-line comments first
content = content:gsub("%-%-.*", "")
content = content:gsub("%-%-%[%[.-%]%]", "")
-- Remove multi-line comments
-- 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