cmark

My personal build of CMark ✏️

Commit
ecd0c8c23f011e845ca96704b154083c0f07a994
Parent
325a1471d2a32bcc1e2d2580b973ff4ba1df85e8
Author
John MacFarlane <jgm@berkeley.edu>
Date

Define CMARK_OPT_SAFE for API compatibility.

It doesn't do anything; this is documented.

Diffstat

2 files changed, 21 insertions, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified man/man3/cmark.3 16 15 1
Modified src/cmark.h 6 6 0
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3
@@ -1,4 +1,4 @@
-.TH cmark 3 "March 17, 2019" "LOCAL" "Library Functions Manual"
+.TH cmark 3 "March 19, 2019" "LOCAL" "Library Functions Manual"
 .SH
 NAME
 .PP
@@ -721,6 +721,20 @@ Render \f[C]softbreak\f[] elements as hard line breaks.
 .nf
 \fC
 .RS 0n
+#define CMARK_OPT_SAFE (1 << 3)
+.RE
+\f[]
+.fi
+
+.PP
+\f[C]CMARK_OPT_SAFE\f[] is defined here for API compatibility, but it no
+longer has any effect. "Safe" mode is now the default: set
+\f[C]CMARK_OPT_UNSAFE\f[] to disable it.
+
+.PP
+.nf
+\fC
+.RS 0n
 #define CMARK_OPT_UNSAFE (1 << 17)
 .RE
 \f[]
diff --git a/src/cmark.h b/src/cmark.h
@@ -552,6 +552,12 @@ char *cmark_render_latex(cmark_node *root, int options, int width);
  */
 #define CMARK_OPT_HARDBREAKS (1 << 2)
 
+/** `CMARK_OPT_SAFE` is defined here for API compatibility,
+    but it no longer has any effect. "Safe" mode is now the default:
+    set `CMARK_OPT_UNSAFE` to disable it.
+ */
+#define CMARK_OPT_SAFE (1 << 3)
+
 /** Render raw HTML and unsafe links (`javascript:`, `vbscript:`,
  * `file:`, and `data:`, except for `image/png`, `image/gif`,
  * `image/jpeg`, or `image/webp` mime types).  By default,