From 9edc20c154234ede9cde4002367a7239bde680ce Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Mon, 7 Feb 2022 20:38:30 +0100 Subject: [PATCH] Fix double counting of CRLF in comments Fixes #151. --- parser.c | 2 +- result/errors/issue151.xml | 0 result/errors/issue151.xml.ent | 6 ++++++ result/errors/issue151.xml.err | 6 ++++++ result/errors/issue151.xml.str | 4 ++++ test/errors/issue151.xml | 9 +++++++++ 6 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 result/errors/issue151.xml create mode 100644 result/errors/issue151.xml.ent create mode 100644 result/errors/issue151.xml.err create mode 100644 result/errors/issue151.xml.str create mode 100644 test/errors/issue151.xml diff --git a/parser.c b/parser.c index d923b8ee..8ca9b2dd 100644 --- a/parser.c +++ b/parser.c @@ -4982,7 +4982,7 @@ get_more: ctxt->input->cur = in; in++; ctxt->input->line++; ctxt->input->col = 1; - continue; /* while */ + goto get_more; } in--; } diff --git a/result/errors/issue151.xml b/result/errors/issue151.xml new file mode 100644 index 00000000..e69de29b diff --git a/result/errors/issue151.xml.ent b/result/errors/issue151.xml.ent new file mode 100644 index 00000000..a36dfeae --- /dev/null +++ b/result/errors/issue151.xml.ent @@ -0,0 +1,6 @@ +./test/errors/issue151.xml:8: parser error : StartTag: invalid element name + << + ^ +./test/errors/issue151.xml:8: parser error : StartTag: invalid element name + << + ^ diff --git a/result/errors/issue151.xml.err b/result/errors/issue151.xml.err new file mode 100644 index 00000000..a36dfeae --- /dev/null +++ b/result/errors/issue151.xml.err @@ -0,0 +1,6 @@ +./test/errors/issue151.xml:8: parser error : StartTag: invalid element name + << + ^ +./test/errors/issue151.xml:8: parser error : StartTag: invalid element name + << + ^ diff --git a/result/errors/issue151.xml.str b/result/errors/issue151.xml.str new file mode 100644 index 00000000..c1dc4762 --- /dev/null +++ b/result/errors/issue151.xml.str @@ -0,0 +1,4 @@ +./test/errors/issue151.xml:8: parser error : StartTag: invalid element name + << + ^ +./test/errors/issue151.xml : failed to parse diff --git a/test/errors/issue151.xml b/test/errors/issue151.xml new file mode 100644 index 00000000..2237e15e --- /dev/null +++ b/test/errors/issue151.xml @@ -0,0 +1,9 @@ + + + + + << +