Loading src/html.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -255,7 +255,6 @@ bool libhtmlpp::HtmlString::validate(std::string &err){ return false; } libhtmlpp::DocElements *libhtmlpp::HtmlString::_buildtreenode(DocElements* prev,libhtmlpp::DocElements* next,libhtmlpp::DocElements* start,libhtmlpp::DocElements* end){ auto checkterminator = [end](DocElements *termel){ int i=0; Loading @@ -267,7 +266,7 @@ libhtmlpp::DocElements *libhtmlpp::HtmlString::_buildtreenode(DocElements* prev, } if (curcel->element->_Type==HtmlEl && curcel->terminator && ((HtmlElement*)curcel->element)->_TagName == ((HtmlElement*)termel->element)->_TagName) { *((HtmlElement*)curcel->element)->_TagName == *((HtmlElement*)termel->element)->_TagName) { if(i==0) return curcel; else Loading Loading @@ -963,7 +962,7 @@ void libhtmlpp::HtmlPage::_CheckHeader(const HtmlString &page){ } } #include <iostream> void libhtmlpp::print(Element* el, std::string *output) { std::stack<libhtmlpp::Element*> *cpylist = new std::stack<libhtmlpp::Element*>; Loading test/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -14,4 +14,4 @@ target_link_libraries(htmlcopytest htmlpp) add_test(htmlcopytest_right htmlcopytest ${CMAKE_SOURCE_DIR}/test/htmlfiles/right.html) #set_tests_properties(htmlpagetest_wrong PROPERTIES WILL_FAIL TRUE) set_tests_properties(htmlpagetest_wrong PROPERTIES WILL_FAIL TRUE) test/htmlcopytest.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public: void printModify(){ std::string *html = new std::string; libhtmlpp::print(&index2,html); std::cout << html << std::endl; std::cout << *html << std::endl; delete html; } Loading @@ -71,13 +71,12 @@ int main(int arc,char *argv[]){ std::cout << "Orginal html:" << std::endl; libhtmlpp::print(index,html); std::cout << *html << std::endl; std::cout << "Modified html:" << std::endl; cpy.printModify(); std::cout << html << std::endl; std::cout << Green << "Test Passed!" << NOCOLOR << std::endl; delete html; }catch(libhtmlpp::HTMLException &exp){ Loading test/htmlpagetest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ int main(int arc,char *argv[]){ libhtmlpp::Element *index=page.loadFile(argv[1]); std::string *html = new std::string; libhtmlpp::print(index,html); std::cout << html << std::endl; std::cout << *html << std::endl; std::cout << Green << "Test Passed!" << NOCOLOR << std::endl; delete html; }catch(libhtmlpp::HTMLException &exp){ Loading Loading
src/html.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -255,7 +255,6 @@ bool libhtmlpp::HtmlString::validate(std::string &err){ return false; } libhtmlpp::DocElements *libhtmlpp::HtmlString::_buildtreenode(DocElements* prev,libhtmlpp::DocElements* next,libhtmlpp::DocElements* start,libhtmlpp::DocElements* end){ auto checkterminator = [end](DocElements *termel){ int i=0; Loading @@ -267,7 +266,7 @@ libhtmlpp::DocElements *libhtmlpp::HtmlString::_buildtreenode(DocElements* prev, } if (curcel->element->_Type==HtmlEl && curcel->terminator && ((HtmlElement*)curcel->element)->_TagName == ((HtmlElement*)termel->element)->_TagName) { *((HtmlElement*)curcel->element)->_TagName == *((HtmlElement*)termel->element)->_TagName) { if(i==0) return curcel; else Loading Loading @@ -963,7 +962,7 @@ void libhtmlpp::HtmlPage::_CheckHeader(const HtmlString &page){ } } #include <iostream> void libhtmlpp::print(Element* el, std::string *output) { std::stack<libhtmlpp::Element*> *cpylist = new std::stack<libhtmlpp::Element*>; Loading
test/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -14,4 +14,4 @@ target_link_libraries(htmlcopytest htmlpp) add_test(htmlcopytest_right htmlcopytest ${CMAKE_SOURCE_DIR}/test/htmlfiles/right.html) #set_tests_properties(htmlpagetest_wrong PROPERTIES WILL_FAIL TRUE) set_tests_properties(htmlpagetest_wrong PROPERTIES WILL_FAIL TRUE)
test/htmlcopytest.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public: void printModify(){ std::string *html = new std::string; libhtmlpp::print(&index2,html); std::cout << html << std::endl; std::cout << *html << std::endl; delete html; } Loading @@ -71,13 +71,12 @@ int main(int arc,char *argv[]){ std::cout << "Orginal html:" << std::endl; libhtmlpp::print(index,html); std::cout << *html << std::endl; std::cout << "Modified html:" << std::endl; cpy.printModify(); std::cout << html << std::endl; std::cout << Green << "Test Passed!" << NOCOLOR << std::endl; delete html; }catch(libhtmlpp::HTMLException &exp){ Loading
test/htmlpagetest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ int main(int arc,char *argv[]){ libhtmlpp::Element *index=page.loadFile(argv[1]); std::string *html = new std::string; libhtmlpp::print(index,html); std::cout << html << std::endl; std::cout << *html << std::endl; std::cout << Green << "Test Passed!" << NOCOLOR << std::endl; delete html; }catch(libhtmlpp::HTMLException &exp){ Loading