Skip to content

Commit f7bf9f6

Browse files
authored
Merge pull request #49 from cidilabs/noHeadingsResolveFix
setting document element metadata for NoHeadings rule
2 parents a158148 + 45e1b10 commit f7bf9f6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Rule/NoHeadings.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ public function check()
3131
&& !$this->getAllElements('h4')
3232
&& !$this->getAllElements('h5')
3333
&& !$this->getAllElements('h6')) {
34-
$this->setIssue($this->dom->documentElement);
34+
/*
35+
Since this rule sets the document element as the issue
36+
we set this flag here so we can process it accordingly in UDOIT.
37+
*/
38+
$metadata = array('isDocumentElement' => true);
39+
$this->setIssue($this->dom->documentElement, null, json_encode($metadata));
3540
}
3641
}
3742
$this->totalTests++;

0 commit comments

Comments
 (0)