capcase with non-ascii characters
zygis opened this issue · 2 comments
zygis commented
Using {{name|capcase}}
https://github.com/adammark/Markup.js/blob/master/src/markup.js#L364
"žygimantas".replace(/\b\w/g, function (s) { return s.toUpperCase(); })
I want receive: "Žygimantas"
But result is: "žYgimantas"
Probably need to avoid regular expressions ... Somehow :)
adammark commented
Good catch. For now, can you overwrite this method with your own?
Mark.pipes.capcase = function (str) { ... }
adammark commented
Should work now—I updated the regex. Thanks again.