summaryrefslogtreecommitdiff
path: root/src/cmark.h
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/cmark.h
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/cmark.h')
-rw-r--r--src/cmark.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmark.h b/src/cmark.h
index d86e13e..4ff1ca0 100644
--- a/src/cmark.h
+++ b/src/cmark.h
@@ -506,6 +506,11 @@ char *cmark_render_commonmark(cmark_node *root, int options, int width);
*/
#define CMARK_OPT_SMART 8
+/** Validate UTF-8 in the input before parsing, replacing illegal
+ * sequences with the replacement character U+FFFD.
+ */
+#define CMARK_OPT_VALIDATE_UTF8 16
+
/**
* ## Version information
*/