Commit ce0d465
committed
Make whitespace filters Unicode-aware
Previously we were only leveraging Ruby's `String#strip` to handle the
logic in these filters but that only covers ASCII whitespace. When
rendering Liquid templates into HTML it would be confusing for these
filters to not strip *all* whitespace.
Additionally, it's helpful when trying to compare two values in, say, a
Liquid conditional.1 parent 1954a26 commit ce0d465
2 files changed
Lines changed: 52 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| |||
312 | 325 | | |
313 | 326 | | |
314 | 327 | | |
315 | | - | |
| 328 | + | |
316 | 329 | | |
317 | 330 | | |
318 | 331 | | |
| |||
324 | 337 | | |
325 | 338 | | |
326 | 339 | | |
327 | | - | |
| 340 | + | |
328 | 341 | | |
329 | 342 | | |
330 | 343 | | |
| |||
336 | 349 | | |
337 | 350 | | |
338 | 351 | | |
339 | | - | |
| 352 | + | |
340 | 353 | | |
341 | 354 | | |
342 | 355 | | |
| |||
348 | 361 | | |
349 | 362 | | |
350 | 363 | | |
351 | | - | |
| 364 | + | |
352 | 365 | | |
353 | 366 | | |
354 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
172 | 181 | | |
173 | 182 | | |
174 | 183 | | |
| |||
703 | 712 | | |
704 | 713 | | |
705 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
706 | 725 | | |
707 | 726 | | |
708 | 727 | | |
709 | 728 | | |
710 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
711 | 738 | | |
712 | 739 | | |
713 | 740 | | |
714 | 741 | | |
715 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
716 | 751 | | |
717 | 752 | | |
718 | 753 | | |
| |||
0 commit comments