You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
messages.append(LintMessage("s-006", "Poem or verse [xhtml]<p>[/] (stanza) without [xhtml]<span>[/] (line) element.", se.MESSAGE_TYPE_WARNING, filename, matches))
1800
1800
1801
-
# Check for elements that don't have a direct block child
1802
-
# Allow white space and comments before the first child
1803
-
# Ignore children of the ToC and landmarks as they do not require p children
1801
+
# Check for elements that don't have a direct block child.
1802
+
# Allow white space and comments before the first child.
1803
+
# Ignore children of the ToC and landmarks as they do not require `<p>` children.
1804
1804
nodes=dom.xpath("/html/body//*[(name()='blockquote' or name()='dd' or name()='header' or name()='li' or name()='footer') and not(./ancestor::*[contains(@epub:type, 'toc') or contains(@epub:type, 'landmarks')]) and (node()[normalize-space(.) and not(self::comment())])[1][not(name()='p' or name()='blockquote' or name()='div' or name()='table' or name()='header' or name()='ul' or name()='ol' or name() = 'section' or name()='footer' or name()='hgroup' or re:test(name(), '^h[0-6]'))]]")
1805
1805
ifnodes:
1806
1806
messages.append(LintMessage("s-007", "Element requires at least one block-level child.", se.MESSAGE_TYPE_WARNING, filename, [node.to_string() fornodeinnodes]))
0 commit comments