Initial site generation
This commit is contained in:
parent
f44c79dc1f
commit
fc44290e3f
35 changed files with 667 additions and 303 deletions
|
@ -19,7 +19,6 @@ MarkdownParser::~MarkdownParser()
|
|||
|
||||
void MarkdownParser::onMultilineQuote()
|
||||
{
|
||||
std::cout << "Adding multiline quote " << mDocumentContent << std::endl;
|
||||
auto quote = std::make_unique<MarkdownMultilineQuote>(mWorkingTag);
|
||||
quote->appendTextContent(mDocumentContent);
|
||||
|
||||
|
@ -34,8 +33,6 @@ void MarkdownParser::onMultilineQuote()
|
|||
|
||||
void MarkdownParser::onInlineQuote()
|
||||
{
|
||||
std::cout << "Adding inline quote " << mLineContent << std::endl;
|
||||
|
||||
auto quote = std::make_unique<MarkdownInlineQuote>();
|
||||
quote->appendTextContent(mLineContent);
|
||||
mLineContent.clear();
|
||||
|
@ -49,8 +46,6 @@ void MarkdownParser::onInlineQuote()
|
|||
|
||||
void MarkdownParser::onHeading(unsigned level)
|
||||
{
|
||||
std::cout << "Adding heading: " << mLineContent << std::endl;
|
||||
|
||||
auto heading = std::make_unique<MarkdownHeading>(level);
|
||||
heading->appendTextContent(mLineContent);
|
||||
mMarkdownDocument->addElement(std::move(heading));
|
||||
|
@ -60,7 +55,6 @@ void MarkdownParser::onNewParagraph()
|
|||
{
|
||||
if (mWorkingBulletList)
|
||||
{
|
||||
std::cout << "Adding bullets to document" << std::endl;
|
||||
mMarkdownDocument->addElement(std::move(mWorkingBulletList));
|
||||
mWorkingBulletList.reset();
|
||||
mDocumentState == DocumentState::NONE;
|
||||
|
@ -71,7 +65,6 @@ void MarkdownParser::onNewParagraph()
|
|||
|
||||
if (!mWorkingParagraph->getNumChildren() == 0)
|
||||
{
|
||||
std::cout << "Adding para to document" << std::endl;
|
||||
mMarkdownDocument->addElement(std::move(mWorkingParagraph));
|
||||
}
|
||||
}
|
||||
|
@ -84,8 +77,6 @@ void MarkdownParser::onTextSpan()
|
|||
|
||||
if(mWorkingParagraph && !mDocumentContent.empty())
|
||||
{
|
||||
std::cout << "Adding text " << mDocumentContent << std::endl;
|
||||
|
||||
auto text_span = std::make_unique<MarkdownTextSpan>();
|
||||
text_span->appendTextContent(mDocumentContent);
|
||||
mWorkingParagraph->addChild(std::move(text_span));
|
||||
|
@ -141,7 +132,6 @@ std::pair<unsigned, bool> MarkdownParser::onTick(unsigned tickCount)
|
|||
|
||||
void MarkdownParser::onLink()
|
||||
{
|
||||
std::cout << "Adding hyperlink to " << mLineContent << " with tag " << mWorkingTag << std::endl;
|
||||
auto element = std::make_unique<MarkdownLink>(mLineContent);
|
||||
mLineContent.clear();
|
||||
|
||||
|
@ -157,7 +147,6 @@ void MarkdownParser::onLink()
|
|||
|
||||
void MarkdownParser::onImage()
|
||||
{
|
||||
std::cout << "Adding image with path " << mLineContent << " and alt" << mWorkingTag << std::endl;
|
||||
auto element = std::make_unique<MarkdownImage>(mLineContent, mWorkingTag);
|
||||
mLineContent.clear();
|
||||
|
||||
|
@ -173,8 +162,6 @@ void MarkdownParser::onImage()
|
|||
|
||||
void MarkdownParser::onBulletItem()
|
||||
{
|
||||
std::cout << "Adding bullet item " << mLineContent << std::endl;
|
||||
|
||||
if (!mWorkingBulletList)
|
||||
{
|
||||
mWorkingBulletList = std::make_unique<MarkdownBulletList>();
|
||||
|
@ -231,7 +218,6 @@ void MarkdownParser::processLine()
|
|||
{
|
||||
if (!flushed_pre_inline)
|
||||
{
|
||||
std::cout << "Flushing pre-line " << std::endl;
|
||||
mDocumentContent += mLineContent;
|
||||
onTextSpan();
|
||||
flushed_pre_inline = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue