We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73791d8 commit 8e3b997Copy full SHA for 8e3b997
1 file changed
src/N3Lexer.js
@@ -296,14 +296,11 @@ export default class N3Lexer {
296
// We can properly evaluate this case if we are
297
// not in rdfStar mode or we can look ahead to
298
// see if there is a pipe following the {
299
- if (input.length > 1 || !this._supportsRDFStar) {
300
- if (input[1] === '|') {
301
- type = '{|', matchLength = 2;
302
- }
303
- else if (!this._lineMode) {
304
- matchLength = 1, type = firstChar;
305
306
+ const long = input.length !== 1;
+ if (long && input[1] === '|')
+ matchLength = 2, type = '{|';
+ else if (!this._lineMode && (long || !this._supportsRDFStar))
+ matchLength = 1, type = firstChar;
307
break;
308
case '!':
309
if (!this._n3Mode)
0 commit comments