Commit 7c5748a
committed
Make prop value escaping more HTM-specific
Now prop values get wrapped into expressions only in the following cases:
* The value contains one or more newlines.
* The value contains both single AND double quotes.
Added tests for unicode text and prop values and modified existing
tests to match the new escaping scheme.1 parent f2b0a0d commit 7c5748a
File tree
2 files changed
+35
-5
lines changed- packages/babel-plugin-transform-jsx-to-tagged-templates
- src
- test
2 files changed
+35
-5
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
Lines changed: 33 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
35 | 50 | | |
36 | 51 | | |
37 | 52 | | |
| |||
55 | 70 | | |
56 | 71 | | |
57 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
58 | 82 | | |
59 | 83 | | |
60 | 84 | | |
| |||
69 | 93 | | |
70 | 94 | | |
71 | 95 | | |
72 | | - | |
| 96 | + | |
73 | 97 | | |
74 | | - | |
75 | | - | |
| 98 | + | |
| 99 | + | |
76 | 100 | | |
77 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
78 | 108 | | |
79 | 109 | | |
80 | 110 | | |
| |||
0 commit comments