rspec/rules/S1933/html/rule.adoc

58 lines
763 B
Plaintext
Raw Normal View History

== Why is this an issue?
This rule checks that the specified child elements are present inside the specified parent elements.
=== Noncompliant code example
Given a parent/child combination of ``++<head>++``/``++<title>++``:
2022-02-04 17:28:24 +01:00
[source,html]
----
<html>
<head>
</head> <!-- Noncompliant; no title element -->
<body>
...
----
=== Compliant solution
2022-02-04 17:28:24 +01:00
[source,html]
----
<html>
<head>
<title>My Page</title>
</head>
<body>
...
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Add the missing "xxx" element to this "yyy".
=== Parameters
.child
****
Name of the child element
****
.parent
****
Name of the parent element
****
endif::env-github,rspecator-view[]