From 0d72ca395f8bf293a0c83e58718ab4603178f504 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Tue, 17 Aug 2021 14:51:40 -0400 Subject: [PATCH] Fixes #611. --- .../cases/github-cases/case-611a.conf | 3 ++ .../cases/github-cases/case-611a@0.html | 7 ++++ .../cases/github-cases/case-611b.conf | 3 ++ .../cases/github-cases/case-611b@0.html | 10 +++++ .../cases/github-cases/case-611c.conf | 3 ++ .../cases/github-cases/case-611c@0.html | 39 +++++++++++++++++++ src/parser.c | 2 +- src/tags.h | 1 + 8 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 regression_testing/cases/github-cases/case-611a.conf create mode 100644 regression_testing/cases/github-cases/case-611a@0.html create mode 100644 regression_testing/cases/github-cases/case-611b.conf create mode 100644 regression_testing/cases/github-cases/case-611b@0.html create mode 100644 regression_testing/cases/github-cases/case-611c.conf create mode 100644 regression_testing/cases/github-cases/case-611c@0.html diff --git a/regression_testing/cases/github-cases/case-611a.conf b/regression_testing/cases/github-cases/case-611a.conf new file mode 100644 index 0000000..a75c08d --- /dev/null +++ b/regression_testing/cases/github-cases/case-611a.conf @@ -0,0 +1,3 @@ +indent: auto +tidy-mark: no +clean: yes diff --git a/regression_testing/cases/github-cases/case-611a@0.html b/regression_testing/cases/github-cases/case-611a@0.html new file mode 100644 index 0000000..98798c5 --- /dev/null +++ b/regression_testing/cases/github-cases/case-611a@0.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/regression_testing/cases/github-cases/case-611b.conf b/regression_testing/cases/github-cases/case-611b.conf new file mode 100644 index 0000000..a75c08d --- /dev/null +++ b/regression_testing/cases/github-cases/case-611b.conf @@ -0,0 +1,3 @@ +indent: auto +tidy-mark: no +clean: yes diff --git a/regression_testing/cases/github-cases/case-611b@0.html b/regression_testing/cases/github-cases/case-611b@0.html new file mode 100644 index 0000000..24aa42e --- /dev/null +++ b/regression_testing/cases/github-cases/case-611b@0.html @@ -0,0 +1,10 @@ + + + + +Issue #611-1 + + + + + diff --git a/regression_testing/cases/github-cases/case-611c.conf b/regression_testing/cases/github-cases/case-611c.conf new file mode 100644 index 0000000..a75c08d --- /dev/null +++ b/regression_testing/cases/github-cases/case-611c.conf @@ -0,0 +1,3 @@ +indent: auto +tidy-mark: no +clean: yes diff --git a/regression_testing/cases/github-cases/case-611c@0.html b/regression_testing/cases/github-cases/case-611c@0.html new file mode 100644 index 0000000..eb4eadd --- /dev/null +++ b/regression_testing/cases/github-cases/case-611c@0.html @@ -0,0 +1,39 @@ + + + + +Issue #611-2d + + + + + + + + +
Name Color Sex Legs +
+ + + + diff --git a/src/parser.c b/src/parser.c index 61e353a..0317eda 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1417,7 +1417,7 @@ Node* TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) return NULL; } } - else /* things like list items */ + else if ( ! nodeIsTEMPLATE( element ) )/* things like list items */ { if (node->tag->model & CM_HEAD) { diff --git a/src/tags.h b/src/tags.h index a02f230..b97ca6d 100644 --- a/src/tags.h +++ b/src/tags.h @@ -463,6 +463,7 @@ TY_PRIVATE uint TY_(nodeHeaderLevel)( Node* node ); #define nodeIsDATALIST( node ) TagIsId( node, TidyTag_DATALIST ) #define nodeIsDATA( node ) TagIsId( node, TidyTag_DATA ) #define nodeIsMATHML( node ) TagIsId( node, TidyTag_MATHML ) /* #130 MathML attr and entity fix! */ +#define nodeIsTEMPLATE( node ) TagIsId( node, TidyTag_TEMPLATE ) /* NOT in HTML 5 */ #define nodeIsACRONYM( node ) TagIsId( node, TidyTag_ACRONYM )