2021-04-17 12:14:21 +02:00
|
|
|
#ifndef PARSER_MARKDOWN_H
|
|
|
|
#define PARSER_MARKDOWN_H
|
|
|
|
|
2021-04-25 12:10:00 +02:00
|
|
|
#include "iparser.h"
|
2021-04-17 12:14:21 +02:00
|
|
|
#include "maddy/parser.h"
|
2021-04-25 12:10:00 +02:00
|
|
|
|
|
|
|
class ParserMarkdown : public IParser
|
2021-04-17 12:14:21 +02:00
|
|
|
{
|
2021-04-24 12:10:57 +02:00
|
|
|
private:
|
|
|
|
std::string processLink(const PageDao &pageDao, UrlProvider &urlProvider, std::smatch &match) const;
|
2021-04-17 12:14:21 +02:00
|
|
|
|
|
|
|
public:
|
2021-04-24 12:10:57 +02:00
|
|
|
ParserMarkdown();
|
2021-04-17 12:14:21 +02:00
|
|
|
std::vector<Headline> extractHeadlines(std::string content) const;
|
|
|
|
std::string parse(const PageDao &pagedao, UrlProvider &provider, std::string content) const;
|
2021-04-25 12:10:00 +02:00
|
|
|
|
|
|
|
std::string extractCommand(std::string cmdname, std::string content) const;
|
|
|
|
std::vector<std::string> extractCategories(std::string content) const;
|
2021-04-17 12:14:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PARSER_MARKDOWN_H
|