Skip to content

fix(docs): enable admonition extension; fix DI steer line breaks#49

Merged
lesnik512 merged 1 commit into
mainfrom
fix/docs-admonition
Jul 13, 2026
Merged

fix(docs): enable admonition extension; fix DI steer line breaks#49
lesnik512 merged 1 commit into
mainfrom
fix/docs-admonition

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Two rendering bugs in the DI steer that shipped in #48. One is currently live.

1. modern-python.org is serving raw markup

The admonition extension was never enabled in mkdocs.yml (only attr_list, md_in_html, pymdownx.emoji). So the !!! tip block fell through as literal text — the site right now renders:

!!! tip "Which one should I use?"

…followed by the body as a raw <pre><code> block. Confirmed against the live site.

mkdocs build --strict passed the whole time, because a fell-through admonition is still valid markdown — just not the markdown you meant. The site had no other admonition anywhere, so nothing had ever exercised the extension.

2. GitHub turned my line wraps into <br>

GFM renders a single newline as <br>, so the hard-wrapped steer broke mid-sentence in 8 places ("...first-class: the" / "...await are built"). The rest of profile/README.md sidesteps this by leaving prose unwrapped — the tagline is a single 173-char line.

Fix

Enable admonition, and write the steer as two blank-line-separated paragraphs on both surfaces. That renders identically under GFM and Python-Markdown, as two real <p> blocks, with no <br> tricks and no reliance on how each parser treats newlines.

Verification

Rendered both surfaces and inspected the HTML, rather than trusting the build:

Surface Result
profile/README.md via GitHub's markdown API 4 <table>, 0 <br>, 2 <p> in the steer
site/index.html real <div class="admonition tip"> with title + 2 paragraphs; no literal !!!

just check-planning: OK. mkdocs build --strict: clean.

Two rendering bugs in the DI steer shipped in #48.

1. modern-python.org was serving the literal text '!!! tip "Which one should
   I use?"' with the body as a raw code block. The admonition extension was
   never enabled in mkdocs.yml -- the site had no other admonition, so nothing
   had caught it. mkdocs build --strict passes either way, since a fell-through
   block is valid markdown, just not the markdown you meant.

2. On the org profile, GitHub renders a single newline as <br>, so the
   hard-wrapped paragraph broke mid-sentence in 8 places. The rest of
   profile/README.md avoids this by leaving prose unwrapped.

Both surfaces now carry the steer as two blank-line-separated paragraphs, which
renders identically under GFM and Python-Markdown with no <br> tricks.

Verified: profile renders 4 tables, 0 <br>, 2 <p>; the site renders a real
<div class="admonition tip"> with title + 2 paragraphs and no literal '!!!'.
@lesnik512 lesnik512 merged commit f2e4f08 into main Jul 13, 2026
1 check passed
@lesnik512 lesnik512 deleted the fix/docs-admonition branch July 13, 2026 21:08
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