private static function get_adjacent_textnode( callable $iterate, callable $get_adjacent_parent, \DOMNode $node = null ) {
		if ( ! isset( $node ) || self::is_block_tag( $node ) ) {
			return null;
		}

		/**
		 * The result node.
		 *
		 * @var \DOMText|null
		 */
		$adjacent = null;

		/**
		 * The initial node.
		 *
		 * @var \DOMNode|null
		 */
		$iterated_node = $node;

		// Iterate to find adjacent node.
		while ( null !== $iterated_node && null === $adjacent ) {
			/**
			 * Let's try the next node.
			 *
			 * @var \DOMNode|null
			 */
			$adjacent = $iterate( $iterated_node );
		}

		// Last ressort.
		if ( null === $adjacent ) {
			/**
			 * The parent node.
			 *
			 * @var \DOMNode|null
			 */
			$adjacent = $get_adjacent_parent( $node->parentNode );
		}

		return $adjacent;
	}