diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-02-18 14:11:13 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-02-18 14:11:13 +0000 |
commit | 51e7ea94956939599972c733f5b65fe71c7eb857 (patch) | |
tree | 7a25ca7131ff7769c664585745b914bb216e430f /kde-apps/okular/files | |
parent | fceeb864f5e0e6155b3f5ed010298e5b7b2f1278 (diff) |
gentoo auto-resync : 18:02:2023 - 14:11:13
Diffstat (limited to 'kde-apps/okular/files')
-rw-r--r-- | kde-apps/okular/files/okular-22.12.2-discount-3.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/kde-apps/okular/files/okular-22.12.2-discount-3.patch b/kde-apps/okular/files/okular-22.12.2-discount-3.patch new file mode 100644 index 000000000000..e9fef2679adb --- /dev/null +++ b/kde-apps/okular/files/okular-22.12.2-discount-3.patch @@ -0,0 +1,47 @@ +From f1f638c2c51a6ef699dee22f6e90aff67beff8ec Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid <aacid@kde.org> +Date: Wed, 1 Feb 2023 22:01:52 +0100 +Subject: [PATCH] Compile with discount 3 + +--- + generators/markdown/converter.cpp | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/generators/markdown/converter.cpp b/generators/markdown/converter.cpp +index 20d3c725f..3c8546b32 100644 +--- a/generators/markdown/converter.cpp ++++ b/generators/markdown/converter.cpp +@@ -93,6 +93,8 @@ QTextDocument *Converter::convertOpenFile() + { + rewind(m_markdownFile); + ++#if defined(MKD_NOLINKS) ++ // on discount 2 MKD_NOLINKS is a define + MMIOT *markdownHandle = mkd_in(m_markdownFile, 0); + + int flags = MKD_FENCEDCODE | MKD_GITHUBTAGS | MKD_AUTOLINK | MKD_TOC | MKD_IDANCHOR; +@@ -103,6 +105,21 @@ QTextDocument *Converter::convertOpenFile() + Q_EMIT error(i18n("Failed to compile the Markdown document."), -1); + return nullptr; + } ++#else ++ // on discount 3 MKD_NOLINKS is an enum value ++ MMIOT *markdownHandle = mkd_in(m_markdownFile, nullptr); ++ ++ mkd_flag_t *flags = mkd_flags(); ++ mkd_set_flag_bitmap(flags, MKD_FENCEDCODE | MKD_GITHUBTAGS | MKD_AUTOLINK | MKD_TOC | MKD_IDANCHOR); ++ if (!m_isFancyPantsEnabled) { ++ mkd_set_flag_num(flags, MKD_NOPANTS); ++ } ++ if (!mkd_compile(markdownHandle, flags)) { ++ Q_EMIT error(i18n("Failed to compile the Markdown document."), -1); ++ return nullptr; ++ } ++ mkd_free_flags(flags); ++#endif + + char *htmlDocument; + const int size = mkd_document(markdownHandle, &htmlDocument); +-- +GitLab + |