Skip to content

Commit e7646d9

Browse files
committed
fix: allow a split between '|' and '}' (see #311 (comment))
1 parent 0539be9 commit e7646d9

2 files changed

Lines changed: 342 additions & 198 deletions

File tree

src/N3Lexer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ export default class N3Lexer {
306306
type = '{|', matchLength = 2;
307307
break;
308308
}
309-
if (!this._lineMode) {
309+
if (
310+
!this._lineMode &&
311+
// The token might actually be {| and we just have not encountered the pipe yet
312+
(input !== '{' || input.length > 1)
313+
) {
310314
matchLength = 1;
311315
type = firstChar;
312316
}

0 commit comments

Comments
 (0)