docs: Standardize markdown block spacing for GHFM and preview compatibility#741
Open
cbrunnkvist wants to merge 1 commit into
Open
docs: Standardize markdown block spacing for GHFM and preview compatibility#741cbrunnkvist wants to merge 1 commit into
cbrunnkvist wants to merge 1 commit into
Conversation
6ce1e49 to
ae7e7cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 atscripts/format_markdown.pyfor 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:
mkdocs build --strictlocally; it completed successfully.