Skip to content

Commit f2e4f08

Browse files
authored
fix(docs): enable admonition extension; fix DI steer line breaks (#49)
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 '!!!'.
1 parent 2e9d42e commit f2e4f08

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ catalog below.
103103
the resolve path itself stays synchronous, and resources that need to `await` are
104104
constructed in the framework lifespan
105105
([recipe](https://modern-di.modern-python.org/recipes/async-lifespan/)).
106+
106107
[`that-depends`](https://github.com/modern-python/that-depends) is the async-first
107108
sibling and stays maintained; it ships a migration guide to `modern-di`.
108109

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extra_css:
3535
- stylesheets/extra.css
3636

3737
markdown_extensions:
38+
- admonition
3839
- attr_list
3940
- md_in_html
4041
- pymdownx.emoji:

profile/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ Open-source templates and libraries for building production-ready Python applica
2121

2222
### Dependency injection
2323

24-
**Which one?** Start new projects on [`modern-di`](https://github.com/modern-python/modern-di)
25-
— a minimal core plus the integrations below. Async apps are first-class: the
26-
resolve path itself stays synchronous, and resources that need to `await` are built
27-
in the framework lifespan. [`that-depends`](https://github.com/modern-python/that-depends)
28-
is the async-first sibling and stays maintained; it ships a migration guide to
29-
`modern-di`.
24+
**Which one?** Start new projects on [`modern-di`](https://github.com/modern-python/modern-di) — a minimal core plus the integrations below. Async apps are first-class: the resolve path itself stays synchronous, and resources that need to `await` are built in the framework lifespan.
25+
26+
[`that-depends`](https://github.com/modern-python/that-depends) is the async-first sibling and stays maintained; it ships a migration guide to `modern-di`.
3027

3128
| Project | What it is | Stars | Downloads |
3229
|---|---|---|---|

0 commit comments

Comments
 (0)