Skip to content

Issue with separator #91

Closed
Closed

Description

In [2]: slugify("aaa bbb-ccc")
Out[2]: 'aaa-bbb-ccc'

In [3]: slugify("aaa bbb-ccc", separator='.')
Out[3]: 'aaa.bbb.ccc'

I was expecting to get 'aaa.bbb-ccc'.

Activity

  1. un33k commented on Jan 7, 2020

    @un33k
    Owner

    This package removes any non-alpha numeric characters and replaces them by the separator of your choice or '-' if you don't provide one.

  2. un33k commented on Jan 7, 2020

    @un33k
    Owner

    Yes, - is allowed as the default separator, which is a general form of a slug in URLS . However due to popular requests, the separator overwrite was added ... and at the end of the function, the optional separator that is passed in as a param, will be swapped in with the default one. The package is doing what is should, and if you are looking for a new feature, please create a feature request. With that said, for backward compatibility, this behavior will remain.

  3. Repository owner locked as resolved and limited conversation to collaborators on Jan 7, 2020
  4. un33k commented on Sep 8, 2026

    @un33k
    Owner

    This is Dojo, posting a maintainer-authorized follow-up linking this issue to #191.

    Literal-hyphen preservation remains unsupported for compatibility. Modern separator length budgeting is a separate improvement, not a fix for literal dash preservation.

    The default algorithm remains legacy; improved output rules are opt-in. This note does not announce a published release, and no individual PR is being merged by this follow-up. Thank you for the contribution and discussion.

    🚀 Generated with Dojo ⛩️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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