Skip to content

Commit

Permalink
Merge pull request #143 from maxiaozhi/patch-1
Browse files Browse the repository at this point in the history
Fix the matching exception
  • Loading branch information
jae-jae authored Jul 5, 2021
2 parents 5953daa + ef0a2ef commit 39dc0ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dom/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function range($selector)
*/
public function removeHead()
{
$html = preg_replace('/<head.+?>.+<\/head>/is', '<head></head>', $this->html);
$html = preg_replace('/(<head>|<head\s+.+?>).+<\/head>/is', '<head></head>', $this->html);
$this->setHtml($html);
return $this->ql;
}
Expand Down

0 comments on commit 39dc0ca

Please sign in to comment.