Skip to content

SlugNormalizer not working since update to 2.0 #694

Answered by colinodell
pmochine asked this question in Q&A
Discussion options

You must be logged in to vote

slug_normalizer is now a top-level configuration item. See https://commonmark.thephpleague.com/2.0/customization/slug-normalizer/ for full details on how to configure it.

In your case, the configuration should look something like this:

    $config = [
        'heading_permalink' => [
            'html_class' => 'heading-permalink',
            'id_prefix' => 'user-content',
            'insert' => 'before',
            'title' => 'Permalink',
            'symbol' => '',
        ],
        'slug_normalizer' => [
            'instance' => new SlugNormalizer(), // or whatever you'd like
        ],
    ];

Notice how slug_normalizer is not part of the heading_permalink section any more.

Hope …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pmochine
Comment options

Answer selected by colinodell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants