Module:Electowidget: Difference between revisions

This makes the get_data test work
(Giving up for now)
(This makes the get_data test work)
 
(One intermediate revision by the same user not shown)
Line 40:
 
 
function p.get_data(datapageframe)
-- copied and adapted from
-- https://en.wikipedia.org/wiki/Module:Format_TemplateData
-- local title, s = mw.title.new(tostring(datapage))
local title = mw.title.new("2009 Burlington, Vermont Mayoral Election data"frame.args[1])
local s = title:getContent()
if 1 == 1 then
-- return mw.text.jsonEncode(s)
-- return mw.text.jsonEncode(datapage)
return table.concat(datapage, ",")
end
local i, j = s:find( "<electowidget>", 1, true )
local r