summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-03-19 16:27:24 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-03-19 16:27:24 -0700
commitecd0c8c23f011e845ca96704b154083c0f07a994 (patch)
treef9961b549ccaa8cf8ba4919f89b0a1cd5ec276be
parent325a1471d2a32bcc1e2d2580b973ff4ba1df85e8 (diff)
Define CMARK_OPT_SAFE for API compatibility.
It doesn't do anything; this is documented.
-rw-r--r--man/man3/cmark.316
-rw-r--r--src/cmark.h6
2 files changed, 21 insertions, 1 deletions
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3
index 8e4b4c7..65ab6d6 100644
--- 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
index ad9d4c4..102aa6f 100644
--- 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,