test.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. // Wrapping text
  2. x =
  3. <div>
  4. Some text that would need to wrap on to a new line in order to display correctly and nicely
  5. </div>
  6. // Wrapping tags
  7. x =
  8. <div>
  9. <first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first>
  10. </div>
  11. // Wrapping tags
  12. x =
  13. <div>
  14. <first>f</first><first>f</first><first>f</first><first>f</first><first>f</first><first>f</first>
  15. </div>
  16. // Wrapping tags
  17. x =
  18. <div>
  19. <a /><b /><c />
  20. <first>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</first> <first>f</first>
  21. </div>
  22. // Wrapping tags
  23. x =
  24. <div>
  25. <sadashdkjahsdkjhaskjdhaksjdhkashdkashdkasjhdkajshdkashdkashd /> <first>f</first>
  26. </div>
  27. x =
  28. <div>
  29. before<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at mollis lorem.</div>after
  30. </div>
  31. x =
  32. <div>
  33. before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}{stuff}{stuff}after{stuff}after
  34. </div>
  35. x =
  36. <div>
  37. before {stuff} after {stuff} after {stuff} after {stuff} after {stuff} after {stuff} {stuff} {stuff} after {stuff} after
  38. </div>
  39. x =
  40. <div>
  41. Please state your <b>name</b> and <b>occupation</b> for the board of <b>school</b> directors.
  42. </div>
  43. function DiffOverview(props) {
  44. const { source, target, since } = props;
  45. return (
  46. <div>
  47. <div className="alert alert-info">
  48. <p>
  49. This diff overview is computed against the current list of records in
  50. this collection and the list it contained on <b>{humanDate(since)}</b>.
  51. </p>
  52. <p>
  53. <b>Note:</b> <code>last_modified</code> and <code>schema</code> record metadata
  54. are omitted for easier review.
  55. </p>
  56. </div>
  57. <Diff source={source} target={target} />
  58. </div>
  59. );
  60. }
  61. x = <font size={-3}><i>Starting at minute {graphActivity.startTime}, running for {graphActivity.length} to minute {graphActivity.startTime + graphActivity.length}</i></font>
  62. x =
  63. <div>
  64. First second third
  65. <div attr="a very long string attribute that will overflow because it is very long">Something</div>
  66. </div>
  67. x =
  68. <div>
  69. <div>
  70. First
  71. </div>
  72. Second
  73. <div>
  74. Third
  75. </div>
  76. </div>
  77. x =
  78. <div>
  79. First <div>
  80. Second
  81. </div> Third
  82. </div>
  83. leading_whitespace =
  84. <div> First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div>
  85. trailing_whitespace =
  86. <div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth </div>
  87. no_leading_or_trailing_whitespace =
  88. <div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div>
  89. facebook_translation_leave_text_around_tag =
  90. <div>
  91. <span>
  92. First
  93. </span>,
  94. (<span>
  95. Second
  96. </span>)
  97. </div>
  98. this_really_should_split_across_lines =
  99. <div>
  100. before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after
  101. </div>
  102. unstable_before =
  103. <div className="yourScore">
  104. Your score: <span className="score">{`${mini.crosstable.users[sessionUserId]} - ${mini.crosstable.users[user.id]}`}</span>
  105. </div>
  106. unstable_after_first_run = (
  107. <div className="yourScore">
  108. Your score:{" "}
  109. <span className="score">{`${mini.crosstable.users[sessionUserId]} - ${mini
  110. .crosstable.users[user.id]}`}</span>
  111. </div>
  112. );
  113. solitary_whitespace =
  114. <div first="first" second="second" third="third" fourth="fourth" fifth="fifth" sixth="sixth"> </div>
  115. jsx_whitespace_on_newline =
  116. <div>
  117. <div>
  118. First
  119. </div> <div>
  120. Second
  121. </div> <div>
  122. Third
  123. </div>
  124. </div>
  125. jsx_around_multiline_element =
  126. <div>Before <div>{"Enough text to make this element wrap on to multiple lines when formatting"}</div> After</div>
  127. jsx_around_multiline_element_second_pass = (
  128. <div>
  129. Before{" "}
  130. <div>
  131. {
  132. "Enough text to make this element wrap on to multiple lines when formatting"
  133. }
  134. </div>{" "}
  135. After
  136. </div>
  137. );
  138. convert_space_expressions =
  139. <div>{" "}</div>
  140. x =
  141. <div>
  142. <first />
  143. <second />
  144. <third />
  145. <fourth />
  146. <fifth />
  147. <sixth />
  148. </div>
  149. const Abc = () => {
  150. return (
  151. <div>
  152. Please state your
  153. {" "}
  154. <b>name</b>
  155. {" "}
  156. and
  157. {" "}
  158. <b>occupation</b>
  159. {" "}
  160. for the board of directors.
  161. </div>
  162. );
  163. };
  164. x = <div id="moo">Some stuff here</div>
  165. headers_and_paragraphs = (
  166. <div>
  167. <h2>First</h2>
  168. <p>The first paragraph.</p>
  169. <h2>Second</h2>
  170. <p>The second paragraph.</p>
  171. </div>
  172. );
  173. no_text_one_tag_per_line =
  174. <div>
  175. <first /><second />
  176. </div>
  177. with_text_fill_line =
  178. <div>
  179. Text <first /><second />
  180. </div>
  181. line_after_br =
  182. <div>
  183. Text<br />
  184. More text <br />
  185. And more<br />
  186. </div>
  187. line_after_br_2 = <div>A<br />B<br />C</div>
  188. br_followed_by_whitespace = <div><br /> text</div>
  189. dont_preserve_blank_lines_when_jsx_contains_text =
  190. <div>
  191. <div>Zeroth</div>
  192. <div>First</div>
  193. Second
  194. </div>
  195. multiple_expressions =
  196. <div>
  197. {header}
  198. {body}
  199. {footer}
  200. </div>
  201. single_expression_child_tags =
  202. <div>
  203. You currently have <strong>{dashboardStr}</strong> and <strong>{userStr}</strong>
  204. </div>
  205. expression_does_not_break =
  206. <div>texty text text text text text text text text text text text {this.props.type} </div>
  207. // FIXME
  208. br_triggers_expression_break =
  209. <div><br />
  210. text text text text text text text text text text text {this.props.type} </div>
  211. jsx_whitespace_after_tag =
  212. <div>
  213. <span a="a" b="b">
  214. {variable}
  215. </span>
  216. {" "}
  217. ({variable})
  218. </div>
  219. x =
  220. <div>
  221. ENDS IN <div>
  222. text text text text text text text text text text text
  223. </div>{" "}
  224. HRS
  225. </div>
  226. x =
  227. <div>
  228. <h2>Message</h2>
  229. Hello, I'm a simple message.
  230. </div>
  231. x =
  232. <div>
  233. Hello, I'm a simple message.
  234. <h2>Message</h2>
  235. </div>
  236. x =
  237. <div>
  238. <div>
  239. <div>
  240. <div>
  241. <div>
  242. Line {startRange.row + 1}:{startRange.column + 1} - {endRange.row + 1}:{endRange.column + 1}{caller}
  243. </div>
  244. </div>
  245. </div>
  246. </div>
  247. </div>
  248. x =
  249. <div>
  250. {" "} <div>text</div>
  251. </div>
  252. // NOTE: Multiple JSX whitespaces are collapsed into a single space.
  253. x =
  254. <div>
  255. {" "}{" "}{" "}
  256. </div>
  257. // Don't break a self-closing element without attributes
  258. // ----------
  259. x =
  260. <p>
  261. text text text text text text text text text text text text text text text<br />text text text text text text
  262. </p>;