mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00

TODO: Currently the exported PDF does not have the outline which is needed to fix via third-party utils.
32 lines
732 B
C++
32 lines
732 B
C++
#ifndef VMARKDOWNCONVERTER_H
|
|
#define VMARKDOWNCONVERTER_H
|
|
|
|
#include <QString>
|
|
|
|
extern "C" {
|
|
#include <src/html.h>
|
|
#include <src/document.h>
|
|
}
|
|
|
|
class VMarkdownConverter
|
|
{
|
|
public:
|
|
VMarkdownConverter();
|
|
~VMarkdownConverter();
|
|
|
|
QString generateHtml(const QString &markdown, hoedown_extensions options, QString &toc);
|
|
|
|
QString generateToc(const QString &markdown, hoedown_extensions options);
|
|
|
|
private:
|
|
QString generateHtml(const QString &markdown, hoedown_extensions options);
|
|
|
|
// VMarkdownDocument *generateDocument(const QString &markdown);
|
|
hoedown_html_flags hoedownHtmlFlags;
|
|
int nestingLevel;
|
|
hoedown_renderer *htmlRenderer;
|
|
hoedown_renderer *tocRenderer;
|
|
};
|
|
|
|
#endif // VMARKDOWNCONVERTER_H
|