@@ -856,8 +856,14 @@ return string.format('data:%s;base64,%s', mime, ss.str.b64e(s.raw)) end end --figure out how to embed the given object + local function P(p) -- get prop + if b.props and b.props[p] then + return b.props[p] + end + return obj.props[p] + end local embedActs = { {ss.mime'image/*', function(s,ctr) if s == nil then return {tag = "picture", nodes = {}} @@ -868,13 +874,13 @@ idx = 1 fbimg = { elt = 'img'; --fallback attrs = { - alt = obj.props.desc or obj.props.detail or ''; - title = obj.props.detail; + alt = P'desc' or P'detail' or ''; + title = P'detail'; src = uri; - width = obj.props.width; - height = obj.props.height; + width = P'width'; + height = P'height'; }; } else idx = #ctr.nodes end table.insert(ctr.nodes, idx, { @@ -975,9 +981,9 @@ rtype[2](src, top) end end local ft = flatten(top) - local cap = b.cap or obj.props.desc or obj.props.detail + local cap = b.cap or P'desc' or P'detail' if b.mode == 'inline' then -- TODO insert caption return ft else