bug in new tostring backend

This commit is contained in:
Adam D. Ruppe 2011-12-10 22:42:11 -05:00
parent c8a01e2d1a
commit f4c4530516
1 changed files with 7 additions and 3 deletions

10
dom.d
View File

@ -1,5 +1,8 @@
module arsd.dom;
// NOTE: do *NOT* override toString on Element subclasses. It won't work.
// Instead, override writeToAppender();
import std.string;
// import std.ascii;
import std.exception;
@ -1521,8 +1524,8 @@ class DocumentFragment : Element {
}
///.
override string toString() const {
return this.innerHTML;
string writeToAppender(Appender!string where = appender!string()) const {
return this.innerHTML(where);
}
}
@ -1716,7 +1719,8 @@ class RawSource : Element {
}
///.
override string toString() const {
string writeToAppender(Appender!string where = appender!string()) const {
where.put(source);
return source;
}