This repository was archived by the owner on Feb 6, 2023. It is now read-only.
Commit f5b2acb
Remove non-leaf blocks in tree => raw conversion
Summary:
The raw => tree data conversion creates new parent blocks because nodes with content on them (leaf nodes) aren't allowed to have children. When we convert to back to raw mode, we need to get rid of these extra non-leaf nodes, otherwise they get rendered.
Also fixed the test cases to respect the tree invariants.
Reviewed By: mitermayer
Differential Revision: D9567760
fbshipit-source-id: 6b53fba057dedeabad63a2492748fc1958b71a961 parent d6a0ac0 commit f5b2acb
File tree
2 files changed
+36
-0
lines changed- src/component/utils/exploration
- __tests__
2 files changed
+36
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
| 105 | + | |
92 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
93 | 111 | | |
| 112 | + | |
94 | 113 | | |
95 | 114 | | |
96 | 115 | | |
| |||
122 | 141 | | |
123 | 142 | | |
124 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
125 | 150 | | |
126 | 151 | | |
127 | 152 | | |
128 | 153 | | |
129 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
130 | 161 | | |
131 | 162 | | |
132 | 163 | | |
| |||
0 commit comments