summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuki Izumi <kivikakk@github.com>2017-05-05 18:02:34 +1000
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-05 10:02:34 +0200
commit6313fff5f9482bdc0489dd19bf9c4ff6ed817e71 (patch)
tree7a3b05970662eee284fd70e68d21c49e4fb16e8f
parent12501f1000f592ff67cca98b6733f0bfa3115f9f (diff)
Remove normalize as an option per #190 (#194)
-rw-r--r--Makefile2
-rw-r--r--man/man3/cmark.314
-rw-r--r--src/blocks.c4
-rw-r--r--src/cmark.h4
-rw-r--r--src/main.c3
5 files changed, 3 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index 1c3fc98..987ed2b 100644
--- a/Makefile
+++ b/Makefile
@@ -135,7 +135,7 @@ $(ALLTESTS): $(SPEC)
leakcheck: $(ALLTESTS)
for format in html man xml latex commonmark; do \
- for opts in "" "--smart" "--normalize"; do \
+ for opts in "" "--smart"; do \
echo "cmark -t $$format $$opts" ; \
valgrind -q --leak-check=full --dsymutil=yes --error-exitcode=1 $(PROG) -t $$format $$opts $(ALLTESTS) >/dev/null || exit 1;\
done; \
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3
index eb38812..5f7fcc6 100644
--- a/man/man3/cmark.3
+++ b/man/man3/cmark.3
@@ -1,4 +1,4 @@
-.TH cmark 3 "November 18, 2016" "LOCAL" "Library Functions Manual"
+.TH cmark 3 "May 05, 2017" "LOCAL" "Library Functions Manual"
.SH
NAME
.PP
@@ -747,18 +747,6 @@ Options affecting parsing
.nf
\fC
.RS 0n
-#define CMARK_OPT_NORMALIZE (1 << 8)
-.RE
-\f[]
-.fi
-
-.PP
-Normalize tree by consolidating adjacent text nodes.
-
-.PP
-.nf
-\fC
-.RS 0n
#define CMARK_OPT_VALIDATE_UTF8 (1 << 9)
.RE
\f[]
diff --git a/src/blocks.c b/src/blocks.c
index 051d2e8..863f5c6 100644
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -1192,9 +1192,7 @@ cmark_node *cmark_parser_finish(cmark_parser *parser) {
finalize_document(parser);
- if (parser->options & CMARK_OPT_NORMALIZE) {
- cmark_consolidate_text_nodes(parser->root);
- }
+ cmark_consolidate_text_nodes(parser->root);
cmark_strbuf_free(&parser->curline);
diff --git a/src/cmark.h b/src/cmark.h
index 6ed7eb0..793fcf4 100644
--- a/src/cmark.h
+++ b/src/cmark.h
@@ -563,10 +563,6 @@ char *cmark_render_latex(cmark_node *root, int options, int width);
* ### Options affecting parsing
*/
-/** Normalize tree by consolidating adjacent text nodes.
- */
-#define CMARK_OPT_NORMALIZE (1 << 8)
-
/** Validate UTF-8 in the input before parsing, replacing illegal
* sequences with the replacement character U+FFFD.
*/
diff --git a/src/main.c b/src/main.c
index 42cd8b1..9482f68 100644
--- a/src/main.c
+++ b/src/main.c
@@ -32,7 +32,6 @@ void print_usage() {
printf(" --nobreaks Render soft line breaks as spaces\n");
printf(" --safe Suppress raw HTML and dangerous URLs\n");
printf(" --smart Use smart punctuation\n");
- printf(" --normalize Consolidate adjacent text nodes\n");
printf(" --help, -h Print usage information\n");
printf(" --version Print version\n");
}
@@ -99,8 +98,6 @@ int main(int argc, char *argv[]) {
options |= CMARK_OPT_SMART;
} else if (strcmp(argv[i], "--safe") == 0) {
options |= CMARK_OPT_SAFE;
- } 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) ||