Commit 82757053 authored by jan.koester's avatar jan.koester
Browse files

container test

parent 3613039c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ const char* libhtmlpp::HTMLException::what(){
    return msg.c_str();
}

libhtmlpp::HTMLException& libhtmlpp::HTMLException::append(const char *src){
libhtmlpp::HTMLException& libhtmlpp::HTMLException::append(const std::string &src){
    msg.append(src);
    return *this;   
}
@@ -62,7 +62,7 @@ libhtmlpp::HTMLException& libhtmlpp::HTMLException::operator[](int errtype){
    return *this;
}

libhtmlpp::HTMLException& libhtmlpp::HTMLException::operator<<(const char *src){
libhtmlpp::HTMLException& libhtmlpp::HTMLException::operator<<(const std::string &src){
    return append(src);
};

+2 −2
Original line number Diff line number Diff line
@@ -57,9 +57,9 @@ namespace libhtmlpp {
        
        enum Type {Note,Warning,Error,Critical};
        
        HTMLException& append(const char *src);
        HTMLException& append(const std::string &src);
        HTMLException& operator[](int errtype);
        HTMLException& operator<<(const char *src);
        HTMLException& operator<<(const std::string &src);
        HTMLException& operator<<(int src);
    private:
        int curCType;
+9 −0
Original line number Diff line number Diff line
@@ -307,6 +307,15 @@ void libhtmlpp::HtmlString::_buildtreenode(const libhtmlpp::DocElements *firstel
            if(curcel==end)
                break;
        }

        for(size_t ii=0; ContainerTypes[ii]; ++ii){
            if(reinterpret_cast<HtmlElement*>(termel->element)->getTagname()==ContainerTypes[ii]){
                HTMLException e;
                e[HTMLException::Error] << reinterpret_cast<HtmlElement*>(termel->element)->getTagname() << " must be terminated !";
                throw e;
            }
        }

        return (const DocElements*) nullptr;
    };

+1 −1
Original line number Diff line number Diff line
<!!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">