You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pnpm format:docs runs scripts/fix-mdx.js. The script changes the content of fenced code blocks.
removeMultipleEmptyLines in scripts/fix-mdx.js removes each empty line that follows another empty line. It does not skip fenced code blocks. normalizeIndentation in the same file skips code blocks, but this function does not.
Python style (PEP 8) puts two empty lines before a top-level function. The script changes those two empty lines to one, so a Python example in the docs no longer follows PEP 8.
To reproduce, on master at 31163f30ae:
Run node scripts/fix-mdx.js contents/docs/workflows/transactional-emails/python.mdx.
Run git diff.
Result: the script removes one of the two empty lines before @shared_task in the Python code block, near line 141:
The script also adds an empty line between <details> and <summary> on each page that has a <details> block. That change is not in a code block, but it changes more lines than an author expects from a formatter.
Technical info
Script: scripts/fix-mdx.js, run by pnpm format:docs
Node 24, Linux
Expected outcome, or solution
The script does not change lines between the opening and closing fence of a code block.
Activity
posthog commentedon Nov 11, 2026
PostHog self-driving picked up this issue. Status: Research is done.
Somebody may already be working on it, so ask before you start a fix.
Report (team access only): https://us.posthog.com/project/2/inbox/reports/01a1ca6f-724a-7108-8193-600572c20ba2?link_source=github_comment