Fixed Story.topic_macro() with as="image" parameter

This commit is contained in:
Tobi Schäfer 2008-05-10 08:47:17 +00:00
parent dc1b3a071e
commit 05f80fe2ab

View file

@ -190,10 +190,17 @@ Story.prototype.topic_macro = function(param) {
} else if (param.as === "image") {
param.imgprefix || (param.imgprefix = "topic_");
var img = HopObject.getFromPath(param.imgprefix + tag.name, "images");
delete param.imgprefix;
delete param.as;
if (img) {
html.openLink({href: tag.href()});
renderImage(img.obj, param)
html.closeLink();
res.push();
img.render_macro(param);
delete param.height;
delete param.width;
delete param.border;
delete param.src;
delete param.alt;
link_filter(res.pop(), param, tag.href());
}
}
return;