Skip to content

Overwrite hardcoded parser #12

@MrMoronIV

Description

@MrMoronIV

Inside Parser/BBCodeParser.php there is:

    protected $parsers = [
        'h1' => [
            'pattern' => '/\[h1\](.*?)\[\/h1\]/s',
            'replace' => '<h1>$1</h1>',
            'content' => '$1'
        ],

However, when I add my own parser for h1 using $bbCode->addParser it doesn't replace the hardcoded one, is there a way to get rid of it without changing the source code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions