New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize Utils#slugify for any scripts #3047

Merged
merged 1 commit into from Dec 29, 2014

Conversation

Projects
None yet
3 participants
@karouf
Contributor

karouf commented Oct 31, 2014

Instead of keeping only characters a to z and 0 to 9 plus the hyphen, it replaces any non-alphanumeric glyphs by an hyphen and generally follows the same rules as before. But it supports Unicode characters.
As far as I can tell, Unicode in regexp is supported from Ruby 1.9 onwards so it shouldn't be too much of a problem with Ruby 1.8 not being supported anymore.

This PR is there to show what I meant when commenting on #2965. I added a few tests that I could think of, please tell me if we can make it more complete.

Generalize Utils#slugify for any scripts
It replaces any non alphanumeric glyphs by an hyphen.
@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Oct 31, 2014

Member

Re-running the tests that failed, as their failures were inexplicable.

This relates to #2918 and #2965.

Member

parkr commented Oct 31, 2014

Re-running the tests that failed, as their failures were inexplicable.

This relates to #2918 and #2965.

@parkr parkr merged commit 612eb73 into jekyll:master Dec 29, 2014

1 check failed

continuous-integration/travis-ci The Travis CI build failed
Details

parkr added a commit that referenced this pull request Dec 29, 2014

@karouf karouf deleted the karouf:slugify-non-latin branch Nov 23, 2015

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

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