File tree Expand file tree Collapse file tree 2 files changed +968
-284
lines changed Expand file tree Collapse file tree 2 files changed +968
-284
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,14 @@ function plugin(options, Parser) {
136
136
chunkStart = this . pos ;
137
137
break ;
138
138
139
+ case 62 : // '>'
140
+ case 125 : // '}'
141
+ this . raise (
142
+ this . pos ,
143
+ "Unexpected token `" + this . input [ this . pos ] + "`. Did you mean `" +
144
+ ( ch === 62 ? ">" : "}" ) + "` or " + "`{\"" + this . input [ this . pos ] + "\"}" + "`?"
145
+ ) ;
146
+
139
147
default :
140
148
if ( isNewLine ( ch ) ) {
141
149
out += this . input . slice ( chunkStart , this . pos ) ;
@@ -414,8 +422,8 @@ function plugin(options, Parser) {
414
422
415
423
// Parse JSX text
416
424
417
- jsx_parseText ( value ) {
418
- let node = this . parseLiteral ( value ) ;
425
+ jsx_parseText ( ) {
426
+ let node = this . parseLiteral ( this . value ) ;
419
427
node . type = "JSXText" ;
420
428
return node ;
421
429
}
@@ -430,7 +438,7 @@ function plugin(options, Parser) {
430
438
431
439
parseExprAtom ( refShortHandDefaultPos ) {
432
440
if ( this . type === tok . jsxText )
433
- return this . jsx_parseText ( this . value ) ;
441
+ return this . jsx_parseText ( ) ;
434
442
else if ( this . type === tok . jsxTagStart )
435
443
return this . jsx_parseElement ( ) ;
436
444
else
You can’t perform that action at this time.
0 commit comments