This PR adjust the slug-importing behaviour. If the slug from the feed is considered valid (after normalization), it will be used; otherwise, it will do what it does now - run it through the _createSlug() method, which will turn it into a kebab-cased string.
Before this change (assuming you haven’t changed the slugWordSeparator config):
if you have a slug: test_1 in your feed, it will be imported as test-1
if you have a slug: tes't_1 in your feed, it will be imported as test-1
if you have a slug: test-1 in your feed, it will be imported as test-1
if you have a slug: test 1 in your feed, it will be imported as test-1
After:
if you have a slug: test_1 in your feed, it will be imported as test_1
if you have a slug: tes't_1 in your feed, it will be imported as test_1
if you have a slug: test-1 in your feed, it will be imported as test-1
if you have a slug: test 1 in your feed, it will be imported as test-1
Description
This PR adjust the slug-importing behaviour. If the slug from the feed is considered valid (after normalization), it will be used; otherwise, it will do what it does now - run it through the
_createSlug()
method, which will turn it into a kebab-cased string.Before this change (assuming you haven’t changed the
slugWordSeparator
config):test_1
in your feed, it will be imported astest-1
tes't_1
in your feed, it will be imported astest-1
test-1
in your feed, it will be imported astest-1
test 1
in your feed, it will be imported astest-1
After:
test_1
in your feed, it will be imported astest_1
tes't_1
in your feed, it will be imported astest_1
test-1
in your feed, it will be imported astest-1
test 1
in your feed, it will be imported astest-1
Related issues
603