adammark/Markup.js

capcase with non-ascii characters

zygis opened this issue · 2 comments

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 :)

Good catch. For now, can you overwrite this method with your own?

Mark.pipes.capcase = function (str) { ... }

Should work now—I updated the regex. Thanks again.