Fix placeholder issues with multiplace spaces in the name
Signed-off-by: Julius Härtl <jus@bitgrid.net> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
parent
b19525ebbc
commit
f57c115d28
File diff suppressed because one or more lines are too long
|
@ -158,7 +158,7 @@ $.fn.imageplaceholder = function(seed, text, size) {
|
|||
this.css('font-size', (height * 0.55) + 'px')
|
||||
|
||||
if (seed !== null && seed.length) {
|
||||
var placeholderText = text.split(' ', 2).map((word) => word[0].toUpperCase()).join('')
|
||||
var placeholderText = text.replace(/\s+/g, ' ').trim().split(' ', 2).map((word) => word[0].toUpperCase()).join('')
|
||||
this.html(placeholderText);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue