File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 */
1818
1919
20+ #include < database/logs.h>
2021#include < editor/html2format.h>
22+ #include < filter/quill.h>
2123#include < filter/string.h>
22- #include < filter/url.h>
23- #include < filter/usfm.h>
24- #include < locale/translate.h>
25- #include < styles/logic.h>
26- #include < database/logs.h>
2724#include < pugixml/utils.h>
28- #include < filter/quill.h>
2925
3026
3127void Editor_Html2Format::load (std::string html)
@@ -36,8 +32,8 @@ void Editor_Html2Format::load (std::string html)
3632 // The web editor produces <hr> and other elements following the HTML specs,
3733 // but the pugixml XML parser needs <hr/> and similar elements.
3834 html = filter::string::html2xml (html);
39-
40- std::string xml = " <body>" + html + " </body>" ;
35+
36+ const std::string xml = " <body>" + html + " </body>" ;
4137 // Parse document such that all whitespace is put in the DOM tree.
4238 // See https://pugixml.org/docs/manual.html for more information.
4339 // It is not enough to only parse with parse_ws_pcdata_single, it really needs parse_ws_pcdata.
Original file line number Diff line number Diff line change 2020#pragma once
2121
2222#include < config/libraries.h>
23- #include < database/styles.h>
2423#pragma GCC diagnostic push
2524#pragma GCC diagnostic ignored "-Weffc++"
2625#pragma GCC diagnostic ignored "-Wsuggest-override"
@@ -41,7 +40,7 @@ class Editor_Html2Format
4140 std::vector <std::string> texts {};
4241 std::vector <std::string> formats {};
4342private:
44- pugi::xml_document document {}; // DOMDocument holding the html .
43+ pugi::xml_document document {}; // DOMDocument holding the HTML .
4544 void preprocess ();
4645 void postprocess ();
4746 void process ();
You can’t perform that action at this time.
0 commit comments