File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function N3Lexer(options) {
2626 // In line mode (N-Triples or N-Quads), only simple features may be parsed
2727 if ( options . lineMode ) {
2828 // Don't tokenize special literals
29- this . _tripleQuotedString = this . _number = this . _boolean = / $ 0 ^ / ;
29+ this . _tripleApos = this . _tripleQuote = this . _number = this . _boolean = / $ 0 ^ / ;
3030 // Swap the tokenize method for a restricted version
3131 var self = this ;
3232 this . _tokenize = this . tokenize ;
Original file line number Diff line number Diff line change @@ -1089,6 +1089,14 @@ describe('N3Parser', function () {
10891089 it ( 'should not parse a prefix declaration' ,
10901090 shouldNotParse ( parser , '@prefix : <p#>.' , 'Unexpected "@prefix" on line 1.' ) ) ;
10911091
1092+ it ( 'should not parse triple-quoted literals' ,
1093+ shouldNotParse ( parser , '_:a <http://ex.org/b> """c""".' ,
1094+ 'Unexpected """"c"""." on line 1.' ) ) ;
1095+
1096+ it ( 'should not parse triple-apostrophe literals' ,
1097+ shouldNotParse ( parser , "_:a <http://ex.org/b> '''c'''." ,
1098+ "Unexpected \"'''c'''.\" on line 1." ) ) ;
1099+
10921100 it ( 'should not parse a variable' ,
10931101 shouldNotParse ( parser , '?a ?b ?c.' , 'Unexpected "?a" on line 1.' ) ) ;
10941102
You can’t perform that action at this time.
0 commit comments