From f0b12a2769734ddf716d7fa4f54f2da90a4dd6ef Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Fri, 10 Jun 2016 21:39:28 +0900 Subject: [PATCH] Make consecutive hyphens in comments a non-error This is experiment and may be reverted later. --- .../impl/ErrorReportingTokenizer.java | 4 +- .../validator/htmlparser/impl/Tokenizer.java | 104 +++++++++++++++++- 2 files changed, 104 insertions(+), 4 deletions(-) diff --git a/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java b/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java index f1749e0b..b2bfe3ae 100644 --- a/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java +++ b/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java @@ -413,8 +413,8 @@ private boolean isAstralPrivateUse(int c) { err("Nameless doctype."); } - @Override protected void errConsecutiveHyphens() throws SAXException { - err("Consecutive hyphens did not terminate a comment. \u201C--\u201D is not permitted inside a comment, but e.g. \u201C- -\u201D is."); + @Override protected void errNestedComment() throws SAXException { + err("Saw \u201C