summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-06-22 10:27:47 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-06-22 10:27:47 -0700
commit54b377278187f02621a60b3585de4ec02399234a (patch)
treec8ab8d17b4f4180244aee0a0e2ab6b9c0676225e /src
parent2215e79323a09ecc70ea2fa8b8b6da170bac8e21 (diff)
Re-add `--safe` command-line option as a no-op.
See #344.
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 6162704..0cc2b3d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -37,6 +37,7 @@ void print_usage() {
printf(" --sourcepos Include source position attribute\n");
printf(" --hardbreaks Treat newlines as hard line breaks\n");
printf(" --nobreaks Render soft line breaks as spaces\n");
+ printf(" --safe Omit raw HTML and dangerous URLs\n");
printf(" --unsafe Render raw HTML and dangerous URLs\n");
printf(" --smart Use smart punctuation\n");
printf(" --validate-utf8 Replace invalid UTF-8 sequences with U+FFFD\n");
@@ -111,6 +112,8 @@ int main(int argc, char *argv[]) {
options |= CMARK_OPT_NOBREAKS;
} else if (strcmp(argv[i], "--smart") == 0) {
options |= CMARK_OPT_SMART;
+ } else if (strcmp(argv[i], "--safe") == 0) {
+ options |= CMARK_OPT_SAFE;
} else if (strcmp(argv[i], "--unsafe") == 0) {
options |= CMARK_OPT_UNSAFE;
} else if (strcmp(argv[i], "--validate-utf8") == 0) {