Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Commit

Permalink
Merge pull request #181 from drubin/patch-2
Browse files Browse the repository at this point in the history
Handle widgets with multiple capital letters
  • Loading branch information
pushmatrix committed Aug 20, 2013
2 parents 9496b31 + 8e14229 commit de40223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascripts/dashing.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Batman.Filters.dashize = (str) ->
dashes_rx1 = /([A-Z]+)([A-Z][a-z])/g;
dashes_rx2 = /([a-z\d])([A-Z])/g;

return str.replace(dashes_rx1, '$1_$2').replace(dashes_rx2, '$1_$2').replace('_', '-').toLowerCase()
return str.replace(dashes_rx1, '$1_$2').replace(dashes_rx2, '$1_$2').replace(/_/g, '-').toLowerCase()

Batman.Filters.shortenedNumber = (num) ->
return num if isNaN(num)
Expand Down

0 comments on commit de40223

Please sign in to comment.