Skip to content

Commit ecd0c8c

Browse files
committed
Define CMARK_OPT_SAFE for API compatibility.
It doesn't do anything; this is documented.
1 parent 325a147 commit ecd0c8c

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

man/man3/cmark.3

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH cmark 3 "March 17, 2019" "LOCAL" "Library Functions Manual"
1+
.TH cmark 3 "March 19, 2019" "LOCAL" "Library Functions Manual"
22
.SH
33
NAME
44
.PP
@@ -717,6 +717,20 @@ Include a \f[C]data\-sourcepos\f[] attribute on all block elements.
717717
.PP
718718
Render \f[C]softbreak\f[] elements as hard line breaks.
719719

720+
.PP
721+
.nf
722+
\fC
723+
.RS 0n
724+
#define CMARK_OPT_SAFE (1 << 3)
725+
.RE
726+
\f[]
727+
.fi
728+
729+
.PP
730+
\f[C]CMARK_OPT_SAFE\f[] is defined here for API compatibility, but it no
731+
longer has any effect. "Safe" mode is now the default: set
732+
\f[C]CMARK_OPT_UNSAFE\f[] to disable it.
733+
720734
.PP
721735
.nf
722736
\fC

src/cmark.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,12 @@ char *cmark_render_latex(cmark_node *root, int options, int width);
552552
*/
553553
#define CMARK_OPT_HARDBREAKS (1 << 2)
554554

555+
/** `CMARK_OPT_SAFE` is defined here for API compatibility,
556+
but it no longer has any effect. "Safe" mode is now the default:
557+
set `CMARK_OPT_UNSAFE` to disable it.
558+
*/
559+
#define CMARK_OPT_SAFE (1 << 3)
560+
555561
/** Render raw HTML and unsafe links (`javascript:`, `vbscript:`,
556562
* `file:`, and `data:`, except for `image/png`, `image/gif`,
557563
* `image/jpeg`, or `image/webp` mime types). By default,

0 commit comments

Comments
 (0)