<commit_before><?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);
    }

}<commit_msg>Use Text helpers for blockquote parsing.<commit_after><?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);
    }

}
{'fraction_non_alphanumeric': 0.1501766784452297, 'fraction_numerical': 0.0035335689045936395, 'mean_word_length': 2.906896551724138, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '948693', 'n_tokens_mistral': 367, 'n_tokens_neox': 356, 'n_words': 74}