eyeling 1.24.10 → 1.24.11
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/dist/browser/eyeling.browser.js +4 -2
- package/eyeling.js +4 -2
- package/lib/prelude.js +4 -2
- package/package.json +1 -1
- package/test/api.test.js +26 -0
|
@@ -12077,8 +12077,10 @@ class PrefixEnv {
|
|
|
12077
12077
|
}
|
|
12078
12078
|
|
|
12079
12079
|
expandQName(q) {
|
|
12080
|
-
|
|
12081
|
-
|
|
12080
|
+
const sep = typeof q === 'string' ? q.indexOf(':') : -1;
|
|
12081
|
+
if (sep >= 0) {
|
|
12082
|
+
const p = q.slice(0, sep);
|
|
12083
|
+
const local = q.slice(sep + 1);
|
|
12082
12084
|
const base = this.map[p] || '';
|
|
12083
12085
|
if (base) return base + local;
|
|
12084
12086
|
return q;
|
package/eyeling.js
CHANGED
|
@@ -12077,8 +12077,10 @@ class PrefixEnv {
|
|
|
12077
12077
|
}
|
|
12078
12078
|
|
|
12079
12079
|
expandQName(q) {
|
|
12080
|
-
|
|
12081
|
-
|
|
12080
|
+
const sep = typeof q === 'string' ? q.indexOf(':') : -1;
|
|
12081
|
+
if (sep >= 0) {
|
|
12082
|
+
const p = q.slice(0, sep);
|
|
12083
|
+
const local = q.slice(sep + 1);
|
|
12082
12084
|
const base = this.map[p] || '';
|
|
12083
12085
|
if (base) return base + local;
|
|
12084
12086
|
return q;
|
package/lib/prelude.js
CHANGED
|
@@ -398,8 +398,10 @@ class PrefixEnv {
|
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
expandQName(q) {
|
|
401
|
-
|
|
402
|
-
|
|
401
|
+
const sep = typeof q === 'string' ? q.indexOf(':') : -1;
|
|
402
|
+
if (sep >= 0) {
|
|
403
|
+
const p = q.slice(0, sep);
|
|
404
|
+
const local = q.slice(sep + 1);
|
|
403
405
|
const base = this.map[p] || '';
|
|
404
406
|
if (base) return base + local;
|
|
405
407
|
return q;
|
package/package.json
CHANGED
package/test/api.test.js
CHANGED
|
@@ -1370,6 +1370,32 @@ res:CITY_Chañaral rdfs:label "Chañaral".
|
|
|
1370
1370
|
},
|
|
1371
1371
|
},
|
|
1372
1372
|
|
|
1373
|
+
{
|
|
1374
|
+
name: '52c parse: prefixed local names preserve colons after the prefix separator',
|
|
1375
|
+
opt: ['-n'],
|
|
1376
|
+
input: `@prefix : <http://example.org/> .
|
|
1377
|
+
|
|
1378
|
+
:foo: a :Bar .
|
|
1379
|
+
|
|
1380
|
+
{
|
|
1381
|
+
<http://example.org/foo:> a <http://example.org/Bar> .
|
|
1382
|
+
}
|
|
1383
|
+
=>
|
|
1384
|
+
{
|
|
1385
|
+
:result :has :success-literal-24 .
|
|
1386
|
+
}.
|
|
1387
|
+
|
|
1388
|
+
{
|
|
1389
|
+
:result :has :success-literal-24 .
|
|
1390
|
+
}
|
|
1391
|
+
=>
|
|
1392
|
+
{
|
|
1393
|
+
:test :is true .
|
|
1394
|
+
}.
|
|
1395
|
+
`,
|
|
1396
|
+
expect: [/:result\s+:has\s+:success-literal-24\s*\./, /:test\s+:is\s+true\s*\./],
|
|
1397
|
+
},
|
|
1398
|
+
|
|
1373
1399
|
{
|
|
1374
1400
|
name: '53 --stream: prints prefixes used in input (not just derived output) before streaming triples',
|
|
1375
1401
|
opt: ['--stream', '-n'],
|