Fix regular expression in Style#getFontStyle()

This commit is contained in:
Jürg Lehni 2014-04-03 17:19:07 +02:00
parent c0d11ea98e
commit dfacc16788

View file

@ -295,7 +295,7 @@ var Style = Base.extend(new function() {
// something deeper down in the optimizer:
// `if (size === 0) size = 0;`
return this.getFontWeight()
+ ' ' + fontSize + (/\[a-z]/i.test(fontSize + '') ? ' ' : 'px ')
+ ' ' + fontSize + (/[a-z]/i.test(fontSize + '') ? ' ' : 'px ')
+ this.getFontFamily();
},