Skip to content

docs: Standardize markdown block spacing for GHFM and preview compatibility#741

Open
cbrunnkvist wants to merge 1 commit into
nanocurrency:mainfrom
cbrunnkvist:markdown-formatting-cleanup
Open

docs: Standardize markdown block spacing for GHFM and preview compatibility#741
cbrunnkvist wants to merge 1 commit into
nanocurrency:mainfrom
cbrunnkvist:markdown-formatting-cleanup

Conversation

@cbrunnkvist

@cbrunnkvist cbrunnkvist commented May 28, 2026

Copy link
Copy Markdown

Several docs files currently render worse in GitHub's Markdown preview than they do in MkDocs because some block-level elements are missing separating blank lines. MkDocs handles our custom layout fine, but GitHub Flavored Markdown and other stricter repository viewers can treat adjacent headings, paragraphs, fences, lists, or tables as one block.

In practice, that makes documentation fixes less inviting than they need to be. Since changes come in through Git and PR review, the repository preview is part of the contribution path. When Markdown looks broken in the de-facto dialect contributors are likely to see first, it creates a small broken window that makes future docs cleanup feel less approachable.

I realize this is a broad diff for whitespace-only formatting, so I kept the scope intentionally narrow: no content changes, no layout macro changes, and no MkDocs extension changes. Normalizing the POSIX-style "text files end with newline" convention would be another reasonable cleanup, but I have intentionally left that out here to avoid adding unrelated noise.

The goal is to lower review and contribution friction when people preview docs in GitHub, not to change how the docs are authored or rendered by MkDocs.

The script I used to apply these compatibility fixups across docs/ is also included at scripts/format_markdown.py for complete transparency. It inserts blank lines around common Markdown block boundaries, including headings, fenced code blocks, lists, and tables, while preserving each file's existing final-newline state.

Verification:

  • Ran mkdocs build --strict locally; it completed successfully.
  • Reviewed the diff to confirm the documentation changes are empty-line formatting only.

@cbrunnkvist cbrunnkvist force-pushed the markdown-formatting-cleanup branch from 6ce1e49 to ae7e7cc Compare May 28, 2026 05:29
@cbrunnkvist cbrunnkvist marked this pull request as ready for review May 28, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant