File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -635,7 +635,7 @@ namespace ts {
635635 }
636636
637637 export function getLeadingCommentRangesOfNode ( node : Node , sourceFileOfNode : SourceFile ) {
638- return getLeadingCommentRanges ( sourceFileOfNode . text , node . pos ) ;
638+ return node . kind !== SyntaxKind . JsxText ? getLeadingCommentRanges ( sourceFileOfNode . text , node . pos ) : undefined ;
639639 }
640640
641641 export function getLeadingCommentRangesOfNodeFromText ( node : Node , text : string ) {
Original file line number Diff line number Diff line change 1+ /// <reference path="fourslash.ts" />
2+
3+ // @Filename : file.jsx
4+ //// <div>
5+ //// // /*0*/
6+ //// /* /*1*/ */
7+ //// /**
8+ //// * /*2*/
9+ //// */
10+ //// foo() /* /*3*/ */
11+ //// // /*4*/
12+ //// /* /*5*/ */
13+ //// /**
14+ //// * /*6*/
15+ //// */
16+ //// </div>
17+ //// <div>
18+ //// // /*7*/
19+ //// /* /*8*/ */
20+ //// /**
21+ //// * /*9*/
22+ //// */
23+
24+ for ( let i = 0 ; i < 10 ; ++ i ) {
25+ goTo . marker ( i . toString ( ) ) ;
26+ verify . not . isInCommentAtPosition ( /*onlyMultiLine*/ false ) ;
27+ }
You can’t perform that action at this time.
0 commit comments