Merge branch 'master' of github.com:johnbintz/formtastic-slug
This commit is contained in:
commit
78020920d5
@ -51,7 +51,7 @@ class SlugInput < Formtastic::Inputs::StringInput
|
|||||||
var setSlug = function(text) {
|
var setSlug = function(text) {
|
||||||
var i, k;
|
var i, k;
|
||||||
|
|
||||||
var originalSlug = text.toLowerCase().replace(/[^a-z0-9]+/g, '-');
|
var originalSlug = text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/(^-|-$)/g, '');
|
||||||
var newSlug = originalSlug;
|
var newSlug = originalSlug;
|
||||||
var index = 0;
|
var index = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user