void-packages/srcpkgs/pdfpc/patches/discount-v3.patch

40 lines
1.2 KiB
Diff

diff --git a/src/classes/renderer/markdown.vala b/src/classes/renderer/markdown.vala
index 3964af8..c77e787 100644
--- a/src/classes/renderer/markdown.vala
+++ b/src/classes/renderer/markdown.vala
@@ -23,7 +23,8 @@
namespace pdfpc.Renderer {
public class MD {
public static string render(string? text = "", bool plain_text = false) {
- Markdown.DocumentFlags flags = Markdown.DocumentFlags.NO_EXT;
+ var flags = new Markdown.DocumentFlags();
+ flags.set(Markdown.DocumentFlag.NO_EXT);
string html;
if (text != "" && plain_text) {
diff --git a/src/libmarkdown.vapi b/src/libmarkdown.vapi
index f762f17..33ea775 100644
--- a/src/libmarkdown.vapi
+++ b/src/libmarkdown.vapi
@@ -95,9 +95,17 @@ namespace Markdown
public void ref_prefix (string prefix);
}
- [Flags]
- [CCode (cname = "mkd_flag_t", cprefix = "MKD_")]
- public enum DocumentFlags
+ [Compact]
+ [CCode (cname = "mkd_flag_t", free_function = "mkd_free_flags")]
+ public class DocumentFlags {
+ [CCode (cname = "mkd_flags")]
+ public DocumentFlags();
+ [CCode (cname = "mkd_set_flag_num")]
+ public void set (DocumentFlag flag);
+ }
+
+ [CCode (cprefix = "MKD_")]
+ public enum DocumentFlag
{
NOLINKS,
NOIMAGE,