File tree 3 files changed +23
-2
lines changed
crates/swc_ecma_transforms_typescript
3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -1629,7 +1629,7 @@ where
1629
1629
fn visit_jsx_element_name ( & mut self , n : & JSXElementName ) {
1630
1630
match n {
1631
1631
JSXElementName :: Ident ( i) => {
1632
- if i. sym . starts_with ( |c : char | c . is_ascii_uppercase ( ) ) {
1632
+ if i. sym . starts_with ( |c : char | !c . is_ascii_lowercase ( ) ) {
1633
1633
n. visit_children_with ( self ) ;
1634
1634
}
1635
1635
}
@@ -2083,7 +2083,7 @@ where
2083
2083
fn visit_mut_jsx_element_name ( & mut self , n : & mut JSXElementName ) {
2084
2084
match n {
2085
2085
JSXElementName :: Ident ( i) => {
2086
- if i. sym . starts_with ( |c : char | c . is_ascii_uppercase ( ) ) {
2086
+ if i. sym . starts_with ( |c : char | !c . is_ascii_lowercase ( ) ) {
2087
2087
n. visit_mut_children_with ( self ) ;
2088
2088
}
2089
2089
}
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+ import ReactDOM from "react-dom" ;
3
+ import { _Component } from "./Component" ;
4
+
5
+ const App = (
6
+ < div >
7
+ < _Component > </ _Component >
8
+ < p > Hello World</ p >
9
+ </ div >
10
+ ) ;
11
+ ReactDOM . render ( App , window . document . getElementById ( "react_root" ) ) ;
Original file line number Diff line number Diff line change
1
+ import ReactDOM from "react-dom" ;
2
+ import { _Component } from "./Component" ;
3
+ const App = < div >
4
+
5
+ < _Component > </ _Component >
6
+
7
+ < p > Hello World</ p >
8
+
9
+ </ div > ;
10
+ ReactDOM . render ( App , window . document . getElementById ( "react_root" ) ) ;
You can’t perform that action at this time.
0 commit comments