reffy 10.1.1 → 10.1.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reffy",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.2",
|
|
4
4
|
"description": "W3C/WHATWG spec dependencies exploration companion. Features a short set of tools to study spec references as well as WebIDL term definitions and references found in W3C specifications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -240,13 +240,27 @@ const extractValueSpaces = doc => {
|
|
|
240
240
|
.map(s => s.trim().replace(/\s+/g, ' '));
|
|
241
241
|
|
|
242
242
|
function addValuespace(name, value) {
|
|
243
|
+
const normalizedValue = normalize(value);
|
|
243
244
|
if (!(name in res)) {
|
|
244
245
|
res[name] = {};
|
|
245
246
|
}
|
|
246
247
|
if (!res[name].value || (pureSyntax && !res[name].pureSyntax)) {
|
|
247
|
-
res[name].value =
|
|
248
|
+
res[name].value = normalizedValue;
|
|
248
249
|
res[name].pureSyntax = pureSyntax;
|
|
249
250
|
}
|
|
251
|
+
else if (res[name].value !== normalizedValue) {
|
|
252
|
+
// Second definition found. Typically happens for the statement and
|
|
253
|
+
// block @layer definitions in css-cascade-5. We'll combine the values
|
|
254
|
+
// as alternative.
|
|
255
|
+
// Hardcoded exception: re-definitions of rgb() and hsl() are legacy
|
|
256
|
+
// constructs, stored separately not to pollute `value`.
|
|
257
|
+
if (name === '<rgb()>' || name === '<hsl()>') {
|
|
258
|
+
res[name].legacyValue = normalizedValue;
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
res[name].value += ` | ${normalizedValue}`;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
250
264
|
}
|
|
251
265
|
|
|
252
266
|
if (nameAndValue[0].match(/^<.*>$|^.*\(\)$/)) {
|