aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-06-25 13:42:45 +0100
committerTheKodeToad <TheKodeToad@proton.me>2023-06-25 13:43:03 +0100
commit02b628653b4d2574766e1148ebd71b426b52a5d2 (patch)
treeb919a21c87334a08eea57122633aea02d679b6b7
parentc75ba0f8551e911b72152ebdd8b2fe1f8bd8f64f (diff)
downloadPrismLauncher-02b628653b4d2574766e1148ebd71b426b52a5d2.tar.gz
PrismLauncher-02b628653b4d2574766e1148ebd71b426b52a5d2.tar.bz2
PrismLauncher-02b628653b4d2574766e1148ebd71b426b52a5d2.zip
Fix markdown header
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
-rw-r--r--launcher/CMakeLists.txt1
-rw-r--r--launcher/Markdown.cpp31
-rw-r--r--launcher/Markdown.h12
3 files changed, 33 insertions, 11 deletions
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index c10064c0..3cc8b6e1 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -684,6 +684,7 @@ SET(LAUNCHER_SOURCES
VersionProxyModel.h
VersionProxyModel.cpp
Markdown.h
+ Markdown.cpp
# Super secret!
KonamiCode.h
diff --git a/launcher/Markdown.cpp b/launcher/Markdown.cpp
new file mode 100644
index 00000000..426067bf
--- /dev/null
+++ b/launcher/Markdown.cpp
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * Prism Launcher - Minecraft Launcher
+ * Copyright (C) 2023 Joshua Goins <josh@redstrate.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "Markdown.h"
+
+QString markdownToHTML(const QString& markdown)
+{
+ const QByteArray markdownData = markdown.toUtf8();
+ char* buffer = cmark_markdown_to_html(markdownData.constData(), markdownData.length(), CMARK_OPT_NOBREAKS | CMARK_OPT_UNSAFE);
+
+ QString htmlStr(buffer);
+
+ free(buffer);
+
+ return htmlStr;
+} \ No newline at end of file
diff --git a/launcher/Markdown.h b/launcher/Markdown.h
index f115dd57..6b261e60 100644
--- a/launcher/Markdown.h
+++ b/launcher/Markdown.h
@@ -21,14 +21,4 @@
#include <QString>
#include <cmark.h>
-static QString markdownToHTML(const QString& markdown)
-{
- const QByteArray markdownData = markdown.toUtf8();
- char* buffer = cmark_markdown_to_html(markdownData.constData(), markdownData.length(), CMARK_OPT_NOBREAKS | CMARK_OPT_UNSAFE);
-
- QString htmlStr(buffer);
-
- free(buffer);
-
- return htmlStr;
-} \ No newline at end of file
+QString markdownToHTML(const QString& markdown); \ No newline at end of file