Some minor changes to constructors, fix Tag::Style
This commit is contained in:
parent
d9f24ecd53
commit
c29d29d592
|
@ -880,13 +880,25 @@ namespace docpp {
|
|||
*/
|
||||
bool empty() const;
|
||||
|
||||
/**
|
||||
* @brief Construct a new Section object
|
||||
* @param tag The tag of the section
|
||||
* @param properties The properties of the section
|
||||
*/
|
||||
Section(const std::string& tag, const Properties& properties = {}) : tag(tag), properties(properties) {};
|
||||
/**
|
||||
* @brief Construct a new Section object
|
||||
* @param tag The tag of the section
|
||||
* @param properties The properties of the section
|
||||
*/
|
||||
Section(const Tag tag, const Properties& properties = {}) : tag(resolve_tag(tag).first), properties(properties) {};
|
||||
/**
|
||||
* @brief Construct a new Section object
|
||||
* @param tag The tag of the section
|
||||
* @param properties The properties of the section
|
||||
* @param elements The elements of the section
|
||||
*/
|
||||
Section(const std::string& tag, const Properties& properties = {}, const std::vector<Element>& elements = {}) : tag(tag), properties(properties) {
|
||||
Section(const std::string& tag, const Properties& properties, const std::vector<Element>& elements) : tag(tag), properties(properties) {
|
||||
for (const auto& element : elements) this->push_back(element);
|
||||
};
|
||||
/**
|
||||
|
@ -895,7 +907,7 @@ namespace docpp {
|
|||
* @param properties The properties of the section
|
||||
* @param elements The elements of the section
|
||||
*/
|
||||
Section(const Tag tag, const Properties& properties = {}, const std::vector<Element>& elements = {}) : tag(resolve_tag(tag).first), properties(properties) {
|
||||
Section(const Tag tag, const Properties& properties, const std::vector<Element>& elements) : tag(resolve_tag(tag).first), properties(properties) {
|
||||
for (const auto& element : elements) this->push_back(element);
|
||||
};
|
||||
/**
|
||||
|
|
|
@ -564,7 +564,7 @@ std::unordered_map<docpp::HTML::Tag, std::pair<std::string, docpp::HTML::Type>>
|
|||
{Tag::Span, {"span", Type::Non_Self_Closing}},
|
||||
{Tag::Strike, {"strike", Type::Non_Self_Closing}},
|
||||
{Tag::Strong, {"strong", Type::Non_Self_Closing}},
|
||||
{Tag::Style, {"style", Type::Non_Closed}},
|
||||
{Tag::Style, {"style", Type::Non_Self_Closing}},
|
||||
{Tag::Sub, {"sub", Type::Non_Self_Closing}},
|
||||
{Tag::Subscript, {"sub", Type::Non_Self_Closing}},
|
||||
{Tag::Sup, {"sup", Type::Non_Self_Closing}},
|
||||
|
|
Loading…
Reference in a new issue