fbrctr / fabricator

A tool for building website UI toolkits and style guides
http://fbrctr.github.io/
MIT License
1.11k stars 124 forks source link

Accommodate for international characters and spelling #226

Open eystein opened 8 years ago

eystein commented 8 years ago

Copying this in here on request from Gitter.


Just thought I'd let you know I made a change to my fabricator-assemble index.js file to accommodate Norwegian spelling, the "æøå" letters by changing the regex to [0-9a-zæøå]. It can probably be useful for other languages as well.

And changed the toTitleCase function to only capitalize the first letter of the link, not each word when consisting of more links, replacing it with this

var word = str.replace(/(\-|_)/g, ' ');
return word.charAt(0).toUpperCase() + word.substr(1).toLowerCase();