summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-06-16 22:21:55 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-06-16 22:22:56 -0700
commit04726a7089e44e7ff4e6c552524841579a1053da (patch)
treebc1657e17edb1d264a0cfe8adfe3c378b7baa8ae /src/main.c
parentfb7af2f0d6ca845b33364c6ce9a704a458e31ff9 (diff)
Added `CMARK_OPT_VALIDATE_UTF8` option.
Also command line option `--validate-utf8`. This option causes cmark to check for valid UTF-8, replacing invalid sequences with the replacement character, U+FFFD. Reinstated api tests for utf8.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index c23071f..5dc97b2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -92,6 +92,8 @@ int main(int argc, char *argv[])
options |= CMARK_OPT_SMART;
} else if (strcmp(argv[i], "--normalize") == 0) {
options |= CMARK_OPT_NORMALIZE;
+ } else if (strcmp(argv[i], "--validate-utf8") == 0) {
+ options |= CMARK_OPT_VALIDATE_UTF8;
} else if ((strcmp(argv[i], "--help") == 0) ||
(strcmp(argv[i], "-h") == 0)) {
print_usage();