Comparing version 5.1.3 to 5.1.4
@@ -235,3 +235,3 @@ 'use strict'; | ||
return rules.map(function (rule) { | ||
var re = /xxx(\S)xxx|attr\(([^,\s)]+)(?:\s*([^,)]*)?)(?:,\s*(\S+))?\)/gm; | ||
var re = /xxx(\S+)xxx|attr\(([^,\s)]+)(?:\s*([^,)]*)?)(?:,\s*(\S+))?\)/gm; | ||
var VAR = 'VAR'; | ||
@@ -238,0 +238,0 @@ var ATTR = 'ATTR'; |
@@ -51,3 +51,3 @@ 'use strict'; | ||
} | ||
if (!/xxx(\S)xxx/gm.exec(decl.value)) { | ||
if (!/xxx(\S+)xxx/gm.exec(decl.value)) { | ||
throw new Error('composes must be a interpolation'); | ||
@@ -65,3 +65,3 @@ } | ||
if (!options.inlineMode) { | ||
var match = /xxx(\S)xxx/gm.exec(decl.value); | ||
var match = /xxx(\S+)xxx/gm.exec(decl.value); | ||
if (match) { | ||
@@ -74,3 +74,3 @@ vars++; | ||
root.walkDecls(function (decl) { | ||
decl.value = decl.value.replace(/xxx(\S)xxx/gm, function (match, p1) { | ||
decl.value = decl.value.replace(/xxx(\S+)xxx/gm, function (match, p1) { | ||
return 'var(--' + options.name + '-' + options.hash + '-' + p1 + ')'; | ||
@@ -77,0 +77,0 @@ }); |
{ | ||
"name": "emotion", | ||
"version": "5.1.3", | ||
"version": "5.1.4", | ||
"description": "high performance css-in-js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -22,3 +22,3 @@ import fs from 'fs' | ||
return rules.map(rule => { | ||
const re = /xxx(\S)xxx|attr\(([^,\s)]+)(?:\s*([^,)]*)?)(?:,\s*(\S+))?\)/gm | ||
const re = /xxx(\S+)xxx|attr\(([^,\s)]+)(?:\s*([^,)]*)?)(?:,\s*(\S+))?\)/gm | ||
const VAR = 'VAR' | ||
@@ -25,0 +25,0 @@ const ATTR = 'ATTR' |
@@ -42,3 +42,3 @@ // @flow | ||
} | ||
if (!/xxx(\S)xxx/gm.exec(decl.value)) { | ||
if (!/xxx(\S+)xxx/gm.exec(decl.value)) { | ||
throw new Error('composes must be a interpolation') | ||
@@ -56,3 +56,3 @@ } | ||
if (!options.inlineMode) { | ||
const match = /xxx(\S)xxx/gm.exec(decl.value) | ||
const match = /xxx(\S+)xxx/gm.exec(decl.value) | ||
if (match) { | ||
@@ -65,3 +65,3 @@ vars++ | ||
root.walkDecls((decl) => { | ||
decl.value = decl.value.replace(/xxx(\S)xxx/gm, (match, p1) => { | ||
decl.value = decl.value.replace(/xxx(\S+)xxx/gm, (match, p1) => { | ||
return `var(--${options.name}-${options.hash}-${p1})` | ||
@@ -68,0 +68,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112956