ether-code 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/ether.js +1 -1
- package/ether-parser.js +9 -1
- package/package.json +1 -1
package/cli/ether.js
CHANGED
package/ether-parser.js
CHANGED
|
@@ -434,6 +434,8 @@ class EtherParser {
|
|
|
434
434
|
valueParts.push('%')
|
|
435
435
|
} else if (current.type === TokenType.SLASH) {
|
|
436
436
|
valueParts.push('/')
|
|
437
|
+
} else if (current.type === TokenType.MINUS) {
|
|
438
|
+
valueParts.push('-')
|
|
437
439
|
} else {
|
|
438
440
|
break
|
|
439
441
|
}
|
|
@@ -444,7 +446,13 @@ class EtherParser {
|
|
|
444
446
|
return {
|
|
445
447
|
type: 'Declaration',
|
|
446
448
|
property: property,
|
|
447
|
-
value: valueParts.join(' ')
|
|
449
|
+
value: valueParts.join(' ')
|
|
450
|
+
.replace(/\(\s+/g, '(')
|
|
451
|
+
.replace(/\s+\)/g, ')')
|
|
452
|
+
.replace(/\s+,/g, ',')
|
|
453
|
+
.replace(/-\s+/g, '-')
|
|
454
|
+
.replace(/\s+/g, ' ')
|
|
455
|
+
.trim()
|
|
448
456
|
}
|
|
449
457
|
}
|
|
450
458
|
|