aboutsummaryrefslogtreecommitdiff
path: root/src/renderers/markdownrenderer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderers/markdownrenderer.hpp')
-rw-r--r--src/renderers/markdownrenderer.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/renderers/markdownrenderer.hpp b/src/renderers/markdownrenderer.hpp
new file mode 100644
index 0000000..7959378
--- /dev/null
+++ b/src/renderers/markdownrenderer.hpp
@@ -0,0 +1,29 @@
+#ifndef MARKDOWNRENDERER_HPP
+#define MARKDOWNRENDERER_HPP
+
+
+#include "documentstyle.hpp"
+#include "documentoutlinemodel.hpp"
+
+#include <memory>
+#include <QTextDocument>
+
+struct MarkdownRenderer
+{
+ MarkdownRenderer() = delete;
+
+
+ //! Renders the given byte sequence into a GeminiDocument.
+ //! @param input The utf8 encoded input string
+ //! @param root_url The url that is used to resolve relative links
+ //! @param style The style which is used to render the document
+ //! @param outline The extracted outline from the document
+ static std::unique_ptr<QTextDocument> render(
+ QByteArray const & input,
+ QUrl const & root_url,
+ DocumentStyle const & style,
+ DocumentOutlineModel & outline
+ );
+};
+
+#endif // MARKDOWNRENDERER_HPP