ParserMarkdown: Inherit from interface, not ParserLegacy
This commit is contained in:
parent
3745a778e5
commit
ebd4adf22f
@ -59,3 +59,13 @@ std::string ParserMarkdown::parse(const PageDao &pagedao, UrlProvider &provider,
|
|||||||
std::string result = maddy->Parse(s);
|
std::string result = maddy->Parse(s);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ParserMarkdown::extractCommand(std::string cmdname, std::string content) const
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> ParserMarkdown::extractCategories(std::string content) const
|
||||||
|
{
|
||||||
|
return { };
|
||||||
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#ifndef PARSER_MARKDOWN_H
|
#ifndef PARSER_MARKDOWN_H
|
||||||
#define PARSER_MARKDOWN_H
|
#define PARSER_MARKDOWN_H
|
||||||
|
|
||||||
#include "parserlegacy.h"
|
#include "iparser.h"
|
||||||
#include "maddy/parser.h"
|
#include "maddy/parser.h"
|
||||||
class ParserMarkdown : public ParserLegacy
|
|
||||||
|
class ParserMarkdown : public IParser
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string processLink(const PageDao &pageDao, UrlProvider &urlProvider, std::smatch &match) const;
|
std::string processLink(const PageDao &pageDao, UrlProvider &urlProvider, std::smatch &match) const;
|
||||||
@ -12,6 +13,9 @@ public:
|
|||||||
ParserMarkdown();
|
ParserMarkdown();
|
||||||
std::vector<Headline> extractHeadlines(std::string content) const;
|
std::vector<Headline> extractHeadlines(std::string content) const;
|
||||||
std::string parse(const PageDao &pagedao, UrlProvider &provider, std::string content) const;
|
std::string parse(const PageDao &pagedao, UrlProvider &provider, std::string content) const;
|
||||||
|
|
||||||
|
std::string extractCommand(std::string cmdname, std::string content) const;
|
||||||
|
std::vector<std::string> extractCategories(std::string content) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PARSER_MARKDOWN_H
|
#endif // PARSER_MARKDOWN_H
|
||||||
|
Loading…
Reference in New Issue
Block a user