Commit c115337
committed
In the 0.3.2 renderer, omit empty section attribute arrays 🍭
Previously, the renderer was always adding a third attributes array to serialized section arrays. In the majority of cases, these are empty arrays that can be safely omitted, saving file size. Now, like with marker attributes, an array is only emitted if there is at least one custom attribute set.1 parent 7b87e74 commit c115337
File tree
2 files changed
+18
-17
lines changed- src/js/renderers/mobiledoc
- tests/unit/renderers/mobiledoc
2 files changed
+18
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
105 | | - | |
106 | | - | |
| 104 | + | |
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
| |||
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
172 | | - | |
173 | | - | |
| 170 | + | |
174 | 171 | | |
175 | 172 | | |
176 | 173 | | |
| |||
200 | 197 | | |
201 | 198 | | |
202 | 199 | | |
203 | | - | |
204 | | - | |
| 200 | + | |
205 | 201 | | |
206 | 202 | | |
207 | 203 | | |
| |||
235 | 231 | | |
236 | 232 | | |
237 | 233 | | |
238 | | - | |
239 | | - | |
| 234 | + | |
240 | 235 | | |
241 | 236 | | |
242 | 237 | | |
| |||
340 | 335 | | |
341 | 336 | | |
342 | 337 | | |
343 | | - | |
344 | | - | |
| 338 | + | |
345 | 339 | | |
346 | 340 | | |
347 | 341 | | |
| |||
361 | 355 | | |
362 | 356 | | |
363 | 357 | | |
364 | | - | |
365 | | - | |
| 358 | + | |
366 | 359 | | |
367 | 360 | | |
368 | 361 | | |
| |||
0 commit comments