diff options
author | Joshua Goins <josh@redstrate.com> | 2023-01-06 15:26:26 -0500 |
---|---|---|
committer | Joshua Goins <josh@redstrate.com> | 2023-01-12 10:08:52 -0500 |
commit | 24a4bd3a1c33702946b88a3d8017268fb8134210 (patch) | |
tree | 971b84ab358661876d434f4364540a57e1845a5a /launcher/ui/pages/modplatform/ModPage.cpp | |
parent | 9901ecda4938827986e4754f770a2b35b64bb774 (diff) | |
download | PrismLauncher-24a4bd3a1c33702946b88a3d8017268fb8134210.tar.gz PrismLauncher-24a4bd3a1c33702946b88a3d8017268fb8134210.tar.bz2 PrismLauncher-24a4bd3a1c33702946b88a3d8017268fb8134210.zip |
refactor: replace hoedown markdown parser with cmark
Signed-off-by: Joshua Goins <josh@redstrate.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/ModPage.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/ModPage.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/launcher/ui/pages/modplatform/ModPage.cpp b/launcher/ui/pages/modplatform/ModPage.cpp index 75be25b2..0f30689e 100644 --- a/launcher/ui/pages/modplatform/ModPage.cpp +++ b/launcher/ui/pages/modplatform/ModPage.cpp @@ -43,13 +43,11 @@ #include <QRegularExpression> #include <memory> -#include <HoeDown.h> - #include "minecraft/MinecraftInstance.h" #include "minecraft/PackProfile.h" #include "ui/dialogs/ModDownloadDialog.h" #include "ui/widgets/ProjectItem.h" - +#include "Markdown.h" ModPage::ModPage(ModDownloadDialog* dialog, BaseInstance* instance, ModAPI* api) : QWidget(dialog) @@ -427,11 +425,6 @@ void ModPage::updateUi() text += "<hr>"; - HoeDown h; - - // hoedown bug: it doesn't handle markdown surrounded by block tags (like center, div) so strip them - current.extraData.body.remove(QRegularExpression("<[^>]*(?:center|div)\\W*>")); - - ui->packDescription->setHtml(text + (current.extraData.body.isEmpty() ? current.description : h.process(current.extraData.body.toUtf8()))); + ui->packDescription->setHtml(text + (current.extraData.body.isEmpty() ? current.description : markdownToHTML(current.extraData.body))); ui->packDescription->flush(); } |