File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -712,6 +712,12 @@ api.createTermDefinition = ({
712
712
'jsonld.SyntaxError' ,
713
713
{ code : 'invalid term definition' , context : localCtx } ) ;
714
714
}
715
+ if ( api . isKeyword ( mapping [ '@id' ] ) ) {
716
+ throw new JsonLdError (
717
+ 'Invalid JSON-LD syntax; keywords may not be used as prefixes' ,
718
+ 'jsonld.SyntaxError' ,
719
+ { code : 'invalid term definition' , context : localCtx } ) ;
720
+ }
715
721
if ( typeof value [ '@prefix' ] === 'boolean' ) {
716
722
mapping . _prefix = value [ '@prefix' ] === true ;
717
723
} else {
Original file line number Diff line number Diff line change @@ -123,8 +123,6 @@ const TEST_TYPES = {
123
123
/ e x p a n d - m a n i f e s t .j s o n l d # t s o 1 1 $ / ,
124
124
// @nest
125
125
/ e x p a n d - m a n i f e s t .j s o n l d # t n 0 0 8 $ / ,
126
- // keywords
127
- / e x p a n d - m a n i f e s t .j s o n l d # t p r 3 3 $ / ,
128
126
// direction
129
127
/ e x p a n d - m a n i f e s t .j s o n l d # t d i 0 1 $ / ,
130
128
/ e x p a n d - m a n i f e s t .j s o n l d # t d i 0 2 $ / ,
@@ -359,8 +357,6 @@ const TEST_TYPES = {
359
357
/ t o R d f - m a n i f e s t .j s o n l d # t s o 1 1 $ / ,
360
358
// @next
361
359
/ t o R d f - m a n i f e s t .j s o n l d # t n 0 0 8 $ / ,
362
- // keywords
363
- / t o R d f - m a n i f e s t .j s o n l d # t p r 3 3 $ / ,
364
360
// direction
365
361
/ t o R d f - m a n i f e s t .j s o n l d # t d i 0 1 $ / ,
366
362
/ t o R d f - m a n i f e s t .j s o n l d # t d i 0 2 $ / ,
You can’t perform that action at this time.
0 commit comments