fix(scraper): rename constructor methods to `new`
This commit is contained in:
parent
be59debe82
commit
a0d4765b91
|
@ -212,7 +212,13 @@ end
|
||||||
-- - Strings that should be added to the record Signals
|
-- - Strings that should be added to the record Signals
|
||||||
local section_scrapers <total>: { Section : function(html: string, record_name: string, module_name: string): { Node }, { Node }, { string } } = {
|
local section_scrapers <total>: { Section : function(html: string, record_name: string, module_name: string): { Node }, { Node }, { string } } = {
|
||||||
["Constructors"] = function(html: string): { Node }, { Node }, { string }
|
["Constructors"] = function(html: string): { Node }, { Node }, { string }
|
||||||
return extract_section_functions(html), {}, {}
|
local constructors <const> = extract_section_functions(html)
|
||||||
|
for _, constructor in ipairs(constructors) do
|
||||||
|
if constructor.token == "function" then
|
||||||
|
constructor.name = "new"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return constructors, {}, {}
|
||||||
end,
|
end,
|
||||||
["Static module functions"] = function(html: string, _: string, module_name: string): { Node }, { Node }, { string }
|
["Static module functions"] = function(html: string, _: string, module_name: string): { Node }, { Node }, { string }
|
||||||
local static_functions, other_functions = extract_section_functions(html, module_name)
|
local static_functions, other_functions = extract_section_functions(html, module_name)
|
||||||
|
|
Loading…
Reference in New Issue