|
|
@ -60,7 +60,7 @@ var weights = 'normal|bold|bolder|lighter|[1-9](?:00)' |
|
|
|
* Font parser RegExp; |
|
|
|
*/ |
|
|
|
|
|
|
|
var font = new RegExp('^ *' |
|
|
|
var fontre = new RegExp('^ *' |
|
|
|
+ '(?:(' + weights + ') *)?' |
|
|
|
+ '(?:(' + styles + ') *)?' |
|
|
|
+ '(\\d+)(' + units + ') *' |
|
|
@ -110,7 +110,7 @@ function normalizedColor(prop) { |
|
|
|
var parseFont = exports.parseFont = function(str){ |
|
|
|
if (cache[str]) return cache[str]; |
|
|
|
var obj = {} |
|
|
|
, captures = font.exec(str); |
|
|
|
, captures = fontre.exec(str); |
|
|
|
if (!captures) return; |
|
|
|
obj.weight = captures[1] || 'normal'; |
|
|
|
obj.style = captures[2] || 'normal'; |
|
|
|