From 24a4bd3a1c33702946b88a3d8017268fb8134210 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 6 Jan 2023 15:26:26 -0500 Subject: refactor: replace hoedown markdown parser with cmark Signed-off-by: Joshua Goins --- launcher/ui/dialogs/ModUpdateDialog.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'launcher/ui/dialogs/ModUpdateDialog.cpp') diff --git a/launcher/ui/dialogs/ModUpdateDialog.cpp b/launcher/ui/dialogs/ModUpdateDialog.cpp index cedd4a96..2704243e 100644 --- a/launcher/ui/dialogs/ModUpdateDialog.cpp +++ b/launcher/ui/dialogs/ModUpdateDialog.cpp @@ -7,6 +7,7 @@ #include "FileSystem.h" #include "Json.h" +#include "Markdown.h" #include "tasks/ConcurrentTask.h" @@ -17,7 +18,6 @@ #include "modplatform/flame/FlameCheckUpdate.h" #include "modplatform/modrinth/ModrinthCheckUpdate.h" -#include #include #include @@ -369,14 +369,7 @@ void ModUpdateDialog::appendMod(CheckUpdateTask::UpdatableMod const& info) QString text = info.changelog; switch (info.provider) { case ModPlatform::Provider::MODRINTH: { - HoeDown h; - // HoeDown bug?: \n aren't converted to
- text = h.process(info.changelog.toUtf8()); - - // Don't convert if there's an HTML tag right after (Qt rendering weirdness) - text.remove(QRegularExpression("(\n+)(?=<)")); - text.replace('\n', "
"); - + text = markdownToHTML(info.changelog.toUtf8()); break; } default: -- cgit