diff --git a/se/se_epub_lint.py b/se/se_epub_lint.py index d9e8c165..f5daec1b 100644 --- a/se/se_epub_lint.py +++ b/se/se_epub_lint.py @@ -1736,7 +1736,9 @@ def _lint_xhtml_syntax_checks(self, filename: Path, dom: se.easy_xml.EasyXmlTree messages.append(LintMessage("s-010", "Empty element. Use [xhtml]
[/] for thematic breaks if appropriate.", se.MESSAGE_TYPE_ERROR, filename, [node.to_string() for node in nodes])) # Check for
and
without ID attribute - nodes = dom.xpath("/html/body//*[self::section or self::article][not(@id)]") + # Ignore items within
as that is a new sectioning root and we don't need to address + # sectioning elements in quotations. + nodes = dom.xpath("/html/body//*[self::section or self::article][not(@id)][not(ancestor::blockquote)]") if nodes: messages.append(LintMessage("s-011", "Element without [attr]id[/] attribute.", se.MESSAGE_TYPE_ERROR, filename, [node.to_tag_string() for node in nodes]))