1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
// Jsx uses block comments for each line commented.
// Common JSX comment scenarios
//@Filename: file.tsx
//// const a = <div tabIndex="0">[|</div>;|]
//// const b = <div>This is [|valid HTML &|] JSX at the same time.</div>;
//// const c = <MyContainer>
//// [|<MyFirstComponent />
//// <MySecondComponent />|]
//// </MyContainer>;
//// const d = <MyContainer>
//// <MyFirstComp[|onent />
//// <MySecondComponent />|]
//// </MyContainer>;
//// const e = <MyComponent>[|{'foo'}|]</MyComponent>;
//// const f = <div>Some text</div[|>;|]
//// const g = <div>Some text<[|/div>;|]
verify.toggleMultilineComment(
`const a = <div tabIndex="0">{/*</div>;*/}
const b = <div>This is {/*valid HTML &*/} JSX at the same time.</div>;
const c = <MyContainer>
{/*<MyFirstComponent />
<MySecondComponent />*/}
</MyContainer>;
const d = <MyContainer>
<MyFirstComp{/*onent />
<MySecondComponent />*/}
</MyContainer>;
const e = <MyComponent>{/*{'foo'}*/}</MyComponent>;
const f = <div>Some text</div{/*>;*/}
const g = <div>Some text<{/*/div>;*/}`
);
|