Skip to content

Commit

Permalink
Merge pull request #49 from cidilabs/noHeadingsResolveFix
Browse files Browse the repository at this point in the history
setting document element metadata for NoHeadings rule
  • Loading branch information
sgcooper78 authored Jan 18, 2023
2 parents a158148 + 45e1b10 commit f7bf9f6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Rule/NoHeadings.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ public function check()
&& !$this->getAllElements('h4')
&& !$this->getAllElements('h5')
&& !$this->getAllElements('h6')) {
$this->setIssue($this->dom->documentElement);
/*
Since this rule sets the document element as the issue
we set this flag here so we can process it accordingly in UDOIT.
*/
$metadata = array('isDocumentElement' => true);
$this->setIssue($this->dom->documentElement, null, json_encode($metadata));
}
}
$this->totalTests++;
Expand Down

0 comments on commit f7bf9f6

Please sign in to comment.