protected function removeTagContent(Node $body, $position, $pattern): void
    {
        if ($body->getNode($position) instanceof TextNode) {
            $positionBody = $body->getNode($position)->getAttribute('data');
            $positionBody = preg_replace($pattern, '', $positionBody);

            $body->getNode($position)->setAttribute('data', $positionBody);
        }
    }
protected function removeTagContent(Node $body, $position, $pattern): void
    {
        if ($body->getNode($position) instanceof TextNode) {
            $positionBody = $body->getNode($position)->getAttribute('data');
            $positionBody = preg_replace($pattern, '', $positionBody);

            $body->getNode($position)->setAttribute('data', $positionBody);
        }
    }
protected function removeTagContent ( Node $ body , $ position , $ pattern ) : void { if ( $ body -> getNode ( $ position ) instanceof TextNode ) { $ positionBody = $ body -> getNode ( $ position ) -> getAttribute ( 'data' ) ; $ positionBody = preg_replace ( $ pattern , '' , $ positionBody ) ; $ body -> getNode ( $ position ) -> setAttribute ( 'data' , $ positionBody ) ; } }
Removes html tag defined by pattern.

@param Node   $body
@param int    $position
@param string $pattern
Removes html tag defined by pattern .