squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
21.2k stars 3.57k forks source link

don't uppercase codeblocks inside `<h5>` headers #7734

Closed DetachHead closed 5 days ago

DetachHead commented 1 week ago

Context

No response

Description

h5 headers convert the text to uppercase (#1522). i don't have an issue with this behavior, but i think by default it should leave any text inside a <code> block as-is, because in most cases code is case-sensitive.

Related links

that issue proposed removing the uppercasing entirely. my proposal is to just remove it inside <code> blocks

Use Cases

API documentation generated by mkdocstrings puts function/class names in headings

Visuals

given the following markdown:

##### Difference between `Never` and `NoReturn`

current: image

proposed: image

Before submitting

DetachHead commented 1 week ago

workaround: put this in your extra.css

.md-typeset h5 code {
    text-transform: none;
}
squidfunk commented 1 week ago

Thanks for suggesting. I think this is a reasonable request, albeit it looks a little weird, but uppercase code is incorrect.

squidfunk commented 5 days ago

Fixed in b3f1eb27f with the patch suggested in https://github.com/squidfunk/mkdocs-material/issues/7734#issuecomment-2495380858.

squidfunk commented 5 days ago

Released as part of 9.5.46.