Commit 5f0fea0
escape lines before calculating max line length
Summary:
We were calculating the max line length of all the lines. Then we were looping over the lines and altering it, making them longer as we were non-printable characters. Then we were doing `max - line.length()` which would underflow because `line.length()` would be longer on the longest line.
This changes it so we're escaping all lines first.
Reviewed By: richardjrossiii
Differential Revision: D88066881
fbshipit-source-id: 33dac68a37caced18b4a302fc27072d2c21168111 parent 3c28919 commit 5f0fea0
1 file changed
+26
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
250 | 262 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
261 | 268 | | |
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
265 | | - | |
266 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
267 | 277 | | |
268 | 278 | | |
269 | 279 | | |
| |||
275 | 285 | | |
276 | 286 | | |
277 | 287 | | |
278 | | - | |
| 288 | + | |
279 | 289 | | |
280 | 290 | | |
281 | 291 | | |
| |||
0 commit comments