Skip to content

Commit 73791d8

Browse files
committed
fix: re-enable line mode check
1 parent 6907296 commit 73791d8

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/N3Lexer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,10 @@ export default class N3Lexer {
315315
case '(':
316316
case ')':
317317
case '}':
318-
matchLength = 1;
319-
type = firstChar;
318+
if (!this._lineMode) {
319+
matchLength = 1;
320+
type = firstChar;
321+
}
320322
break;
321323
case '|':
322324
if (input.length > 1 && input[1] === '}') {

test/N3Parser-test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,6 +1670,9 @@ describe('Parser', () => {
16701670
it('should not parse @forAll',
16711671
shouldNotParse(parser, '@forAll <x>.', 'Unexpected "@forAll" on line 1.'));
16721672

1673+
it('should not parse an object list',
1674+
shouldNotParse(parser, '<a> <b> <c>, <d> .', 'Invalid IRI on line 1.'));
1675+
16731676
it('should not parse RDF-star in the subject position',
16741677
shouldNotParse(parser, '<<<a> <b> <c>>> <a> <b> .',
16751678
'Unexpected RDF-star syntax on line 1.'));

0 commit comments

Comments
 (0)