Commit ea6b99a
authored
Fix beehiiv heading conversion (#110)
- Beehiiv expects real heading tags with anchor metadata instead of paragraphs containing bold text for headings.
- The previous conversion produced `<p><strong>…</strong></p>` for `#`/`##`/... headings, which did not match Beehiiv rich media output.
### Description
- Update `vscode-to-beehiiv.html` to emit actual heading tags (`<h1>`–`<h6>`) instead of paragraph wrappers for markdown headings.
- Add `HEADING_STYLE` derived from `BLOCK_STYLE` and set Beehiiv-specific attributes on headings: `data-id`, `id`, `data-anchor`, `data-anchor-title`, `data-anchor-id`, `data-anchor-title-sync`, and `data-anchor-id-sync`.
- Preserve heading content with `innerHTML` and set `data-pm-slice="1 1 []"` on the first block to match Beehiiv slice behavior.
- Keep existing handling for paragraphs, lists, code blocks, and link attributes unchanged.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69651f115954832595089d77a600fc86)1 parent 87c511e commit ea6b99a
1 file changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
219 | 231 | | |
220 | 232 | | |
221 | 233 | | |
| |||
0 commit comments