Saving a post would sometimes strip formatting — particularly nested lists and code blocks.
Root cause
The markdown conversion step (HTML → Markdown → HTML roundtrip) was using a regex-based approach that couldn't handle:
Nested
<ul>inside<ol>(and vice versa)Code blocks containing HTML-like syntax
Blockquotes with multiple paragraphs
The fix
We replaced the regex-based converter with a proper AST-based serializer that correctly handles all TipTap node types.
All formatting is now preserved through save and reload cycles — including edge cases like:
Nested lists 3+ levels deep
Code blocks with
<script>tags insideBlockquotes containing lists and code
If you had posts with broken formatting, re-editing and saving them will now preserve the correct structure.