png reworking

This commit is contained in:
Adam D. Ruppe 2013-06-10 12:21:32 -04:00
parent 84832e6f86
commit 0ef6ebd977
9 changed files with 1222 additions and 1008 deletions

11
web.d
View file

@ -2056,11 +2056,12 @@ string toHtml(T)(T a) {
ret = a.toString();
} else
static if(isArray!(T) && !isSomeString!(T)) {
static if(__traits(compiles, typeof(T[0]).makeHtmlArray(a)))
ret = to!string(typeof(T[0]).makeHtmlArray(a));
else
foreach(v; a)
ret ~= toHtml(v);
static if(__traits(compiles, typeof(a[0]).makeHtmlArray(a))) {
ret = to!string(typeof(a[0]).makeHtmlArray(a));
} else {
foreach(v; a)
ret ~= toHtml(v);
}
} else static if(is(T : Element))
ret = a.toString();
else static if(__traits(compiles, a.makeHtmlElement().toString()))