<?php

namespace FluxBB\Markdown\Parser;

use FluxBB\Markdown\Common\Text;
use FluxBB\Markdown\Node\Blockquote;
use FluxBB\Markdown\Node\Node;

class BlockquoteParser implements ParserInterface
{

    public function parseLine(Text $line, Node $target, callable $next)
    {
        $text = $line->getString();
        if ($text[0] == '>') {
            $line = new Text(trim(substr($line, 1)));

            $quote = new Blockquote();
            $target = $target->accept($quote);
        }

        return $next($line, $target);
    }

}

<?php

namespace FluxBB\Markdown\Parser;

use FluxBB\Markdown\Common\Text;
use FluxBB\Markdown\Node\Blockquote;
use FluxBB\Markdown\Node\Node;

class BlockquoteParser implements ParserInterface
{

    public function parseLine(Text $line, Node $target, callable $next)
    {
        $pattern = '/^[ ]{0,3}\>[ ]?/';

        if ($line->match($pattern)) {
            $line->replace($pattern, '');

            $target = $target->accept(new Blockquote());
        }

        return $next($line, $target);
    }

}

Use Text helpers for blockquote parsing.
Use Text helpers for blockquote parsing.
