Commit bcb0c0a
authored
fix: skip wrapping heading in callouts for non pragraph (#1230)
[![PR App][icn]][demo] | Fix RM-XYZ
:-------------------:|:----------:
## 🧰 Changes
If a callout starts with an html element, the content gets dropped when
migrated. I found that this is because in migrate-callouts.ts, we are
wrapping the first children in a heading, assuming the node has a
children attribute, and putting the children under the heading. However,
the node might be an HTML node (or could be others) that don't have
children, as a result the value gets dropped.
Current approach to fix is to avoid wrapping the node entirely if it's
not a paragraph since the others won't have children.
## 🧬 QA & Testing
```
// Use the migrate() function
const markdown = '> 1 parent 615fe1b commit bcb0c0a
File tree
2 files changed
+21
-1
lines changed- __tests__/migration
- processor/transform
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
0 commit comments