feat: add optional latex block support

This commit is contained in:
Petra Baranski
2023-07-25 22:24:17 +02:00
parent f0c282e0c0
commit 01d1e48d11
6 changed files with 279 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
#include "maddy/headlineparser.h"
#include "maddy/horizontallineparser.h"
#include "maddy/htmlparser.h"
#include "maddy/latexblockparser.h"
#include "maddy/orderedlistparser.h"
#include "maddy/paragraphparser.h"
#include "maddy/quoteparser.h"
@@ -259,6 +260,17 @@ private:
nullptr
);
}
else if (
this->config &&
(this->config->enabledParsers & maddy::types::LATEX_BLOCK_PARSER) != 0 &&
maddy::LatexBlockParser::IsStartingLine(line)
)
{
parser = std::make_shared<LatexBlockParser>(
nullptr,
nullptr
);
}
else if (
(
!this->config ||