Skip to content

Commit

Permalink
Fixed problem in dom_builder
Browse files Browse the repository at this point in the history
  • Loading branch information
pakozm committed Nov 9, 2015
1 parent 696c9fd commit 104e6e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion IPyLua/dom_builder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ local element_mt = {
end
tbl[#tbl+1] = ">"
for i=1,#self do
local data = pyget(self[i])
local data
local tt = type(self[i])
if tt == "string" or tt == "number" then
data = { ["text/html"] = self[i] }
else
data = pyget(self[i])
end
if data["image/png"] then
tbl[#tbl+1] = ('<img src="data:image/png;base64,%s">'):format(data["image/png"])
elseif data["text/html"] then
Expand Down

0 comments on commit 104e6e0

Please sign in to comment.