From 79084c5a8481cd2cf8e4df632ffa358c1e41335b Mon Sep 17 00:00:00 2001 From: Tom Anthony Date: Thu, 18 Apr 2019 19:17:14 +0100 Subject: [PATCH] Migrate issue related test files into named files. --- html/parse.go | 7 ++++--- .../go/issue_30600_parse_panics_in_cell_mode.dat | 12 ++++++++++++ .../issue_30961_error_nested_unknown_tag_types.dat | 11 +++++++++++ html/testdata/go/template.dat | 12 ------------ 4 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat create mode 100644 html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat diff --git a/html/parse.go b/html/parse.go index 2bd572ee..994c8c50 100644 --- a/html/parse.go +++ b/html/parse.go @@ -1692,8 +1692,9 @@ func inCellIM(p *parser) bool { return true } // Close the cell and reprocess. - p.popUntil(tableScope, a.Td, a.Th) - p.clearActiveFormattingElements() + if p.popUntil(tableScope, a.Td, a.Th) { + p.clearActiveFormattingElements() + } p.im = inRowIM return false } @@ -2329,4 +2330,4 @@ func ParseFragment(r io.Reader, context *Node) ([]*Node, error) { c = next } return result, nil -} \ No newline at end of file +} diff --git a/html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat b/html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat new file mode 100644 index 00000000..741f4b1a --- /dev/null +++ b/html/testdata/go/issue_30600_parse_panics_in_cell_mode.dat @@ -0,0 +1,12 @@ +#data +
+#errors +#document +| +| +| +| +| +| +| diff --git a/html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat b/html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat new file mode 100644 index 00000000..e3149644 --- /dev/null +++ b/html/testdata/go/issue_30961_error_nested_unknown_tag_types.dat @@ -0,0 +1,11 @@ +#data +

+#errors +#document +| +| +| +| +| +|

+|

diff --git a/html/testdata/go/template.dat b/html/testdata/go/template.dat index 46193372..ceaf0229 100644 --- a/html/testdata/go/template.dat +++ b/html/testdata/go/template.dat @@ -60,15 +60,3 @@ | | | - -#data -

-#errors -#document -| -| -| -| -| -|

-|