Just found of the active bug #371
Adding a small bug that the open PR can also fix.
When nested list items contain styled text, extra blank lines appear between items.
Cause: fixNestedLists() regex uses \S which matches the m in ANSI reset codes (\u001b[0m), inserting unintended newlines.
Happy to make a PR, for agents and humans alike