n3 2.0.2 → 2.0.3
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/browser/n3.min.js +1 -1
- package/lib/N3Parser.js +1 -1
- package/package.json +1 -1
- package/src/N3Parser.js +2 -2
package/lib/N3Parser.js
CHANGED
|
@@ -549,7 +549,7 @@ class N3Parser {
|
|
|
549
549
|
break;
|
|
550
550
|
// Create a language-tagged string
|
|
551
551
|
case 'langcode':
|
|
552
|
-
if (token.value.length > 8) return this._error('Detected language tag
|
|
552
|
+
if (token.value.split('-').some(t => t.length > 8)) return this._error('Detected language tag with subtag longer than 8 characters', token);
|
|
553
553
|
literal = this._factory.literal(this._literalValue, token.value);
|
|
554
554
|
this._literalLanguage = token.value;
|
|
555
555
|
token = null;
|
package/package.json
CHANGED
package/src/N3Parser.js
CHANGED
|
@@ -585,8 +585,8 @@ export default class N3Parser {
|
|
|
585
585
|
break;
|
|
586
586
|
// Create a language-tagged string
|
|
587
587
|
case 'langcode':
|
|
588
|
-
if (token.value.length > 8)
|
|
589
|
-
return this._error('Detected language tag
|
|
588
|
+
if (token.value.split('-').some(t => t.length > 8))
|
|
589
|
+
return this._error('Detected language tag with subtag longer than 8 characters', token);
|
|
590
590
|
literal = this._factory.literal(this._literalValue, token.value);
|
|
591
591
|
this._literalLanguage = token.value;
|
|
592
592
|
token = null;
|