src/Blocks/Headers/BlockHeaderTwo.php
public function validateLineType($lineNumber)
    {
        $dataObject = $this->factory->getDataObject();
        $currentLineObject = $dataObject->getLine($lineNumber);
        if ($lineNumber < 1 || strpos($currentLineObject, '|') !== false) {
            return false;
        }

        $previousLineObject = $dataObject->getLine($lineNumber - 1);

        if (!$this->lineIsObjectOf($previousLineObject, BlockTypes::BLOCK_PARAGRAPH)) {
            return false;
        }

        return (bool) preg_match('/([\-]{3,})/', $currentLineObject);
    }
public function validateLineType($lineNumber)
    {
        $dataObject = $this->factory->getDataObject();
        $currentLineObject = $dataObject->getLine($lineNumber);
        if ($lineNumber < 1 || strpos($currentLineObject, '|') !== false) {
            return false;
        }

        $previousLineObject = $dataObject->getLine($lineNumber - 1);

        if (!$this->lineIsObjectOf($previousLineObject, BlockTypes::BLOCK_PARAGRAPH)) {
            return false;
        }

        return (bool) preg_match('/([\-]{3,})/', $currentLineObject);
    }
@param int $lineNumber

@return bool