Consider using markdown.extensions.nl2br #183
Labels
kind/documentation
Categorizes issue or PR as related to documentation.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
One of the common frustrations with mkdocs-material is how new lines are handled. Some examples:
Will not be rendered as a list:
Will be rendered as a list:
This is a particular pain point in #129 where we're adding generated API reference docs using https://github.com/elastic/crd-ref-docs that are running into this problem. This has also been a recurring pain point in Gateway API documentation, with far too many lists missing the correct line breaks and therefore not being rendered correctly.
If we were to enable the
markdown.extensions.nl2br
extension, the above problems would go away, but in their place we'd get a different one. It's common to add line breaks in markdown to break up paragraphs for simpler code review and editing, for example, wrapping at 80 chars. If we do this, it creates a strange effect:Before extension:

After extension:

Markdown source:
The text was updated successfully, but these errors were encountered: