ALLOW-002: allow has no rule code
Error: the page doesn't build until this is fixed.
allow switches off one rule, named by its code, for the next element. Without the code it switches off
nothing, so the rule it was meant for still runs. The code is in every message: error[SEO-003].
Fails
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
allow "the hero splits its headline into two h1"
h1 "Run faster."
}error[ALLOW-002]: `allow` needs `rule`
--> page.hypra:3:3
|
3 | allow "the hero splits its headline into two h1"
| ^^^^^
= help: allow("SEO-003") "reason"
= docs: https://hypralang.dev/rules/allow-002/
error[SEO-003]: more than one h1 on this page
--> page.hypra:4:3
|
4 | h1 "Run faster."
| ^^
= help: a page has one h1 with its main topic; use h2 for sections
= docs: https://hypralang.dev/rules/seo-003/
2 errors, 0 warningsFixed
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
allow("SEO-003") "the hero splits its headline into two h1"
h1 "Run faster."
}