Allow custom tag processing in md
This commit is contained in:
parent
22157169c0
commit
101bfb4207
12 changed files with 214 additions and 43 deletions
|
@ -21,6 +21,12 @@ void MarkdownConverter::onBlockElement(MarkdownElementWithChildren* mdElement, H
|
|||
html_quote->setText(child->getTextContent());
|
||||
htmlElement->addChild(std::move(html_quote));
|
||||
}
|
||||
else if (child->getType() == MarkdownElement::Type::CUSTOM_INLINE)
|
||||
{
|
||||
auto html_text = std::make_unique<HtmlTextRun>();
|
||||
html_text->setText(child->getTextContent());
|
||||
htmlElement->addChild(std::move(html_text));
|
||||
}
|
||||
else if(child->getType() == MarkdownElement::Type::TEXT_SPAN)
|
||||
{
|
||||
auto html_text = std::make_unique<HtmlTextRun>();
|
||||
|
@ -87,6 +93,12 @@ void MarkdownConverter::convert(MarkdownDocument* markdownDoc, HtmlElement* pare
|
|||
html_quote->setText(md_element->getTextContent());
|
||||
parentElement->addChild(std::move(html_quote));
|
||||
}
|
||||
else if(md_element->getType() == MarkdownElement::Type::CUSTOM_MULTILINE)
|
||||
{
|
||||
auto html_text = std::make_unique<HtmlTextRun>();
|
||||
html_text->setText("\n" + md_element->getTextContent() + "\n");
|
||||
parentElement->addChild(std::move(html_text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue