(func)
| 2319 | exports.imgElement = imgElement; |
| 2320 | |
| 2321 | function imgElement(func) { |
| 2322 | return function(element, messages) { |
| 2323 | return promises.when(func(element)).then(function(result) { |
| 2324 | var attributes = _.clone(result); |
| 2325 | if (element.altText) { |
| 2326 | attributes.alt = element.altText; |
| 2327 | } |
| 2328 | return [Html.freshElement("img", attributes)]; |
| 2329 | }); |
| 2330 | }; |
| 2331 | } |
| 2332 | |
| 2333 | // Undocumented, but retained for backwards-compatibility with 0.3.x |
| 2334 | exports.inline = exports.imgElement; |
no test coverage detected