jsx.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <div>
  2. {
  3. /* comment */
  4. }
  5. </div>;
  6. <div>
  7. {/* comment */
  8. }
  9. </div>;
  10. <div>
  11. {/* comment
  12. */
  13. }
  14. </div>;
  15. <div>
  16. {a/* comment
  17. */
  18. }
  19. </div>;
  20. <div>
  21. {/* comment
  22. */
  23. a
  24. }
  25. </div>;
  26. <div>
  27. {/* comment */
  28. }
  29. </div>;
  30. <div>
  31. {/* comment */}
  32. </div>;
  33. <div>
  34. {
  35. // single line comment
  36. }
  37. </div>;
  38. <div>
  39. {
  40. // multiple line comments 1
  41. // multiple line comments 2
  42. }
  43. </div>;
  44. <div>
  45. {
  46. // multiple mixed comments 1
  47. /* multiple mixed comments 2 */
  48. /* multiple mixed comments 3 */
  49. // multiple mixed comments 4
  50. }
  51. </div>;
  52. <div>
  53. {
  54. // Some very v ery very very merry (xmas) very very long line to break line width limit
  55. }
  56. </div>;
  57. <div>{/*<div> Some very v ery very very long line to break line width limit </div>*/}</div>;
  58. <div>
  59. {/**
  60. * JSDoc-y comment in JSX. I wonder what will happen to it?
  61. */}
  62. </div>;
  63. <div>
  64. {
  65. /**
  66. * Another JSDoc comment in JSX.
  67. */
  68. }
  69. </div>;
  70. <div
  71. /**
  72. * Handles clicks.
  73. */
  74. onClick={() => {}}>
  75. </div>;
  76. <div
  77. // comment
  78. >
  79. {foo}
  80. </div>;
  81. <div
  82. className="foo" // comment
  83. >
  84. {foo}
  85. </div>;
  86. <div
  87. className="foo"
  88. // comment
  89. >
  90. {foo}
  91. </div>;
  92. <div // comment
  93. id="foo"
  94. >
  95. {children}
  96. </div>;
  97. <Wrapper>
  98. {}
  99. <Component />
  100. </Wrapper>