Files
renovate/tools/mkdocs/mkdocs-hooks/markdown-tab-length.py
Jamie Tanna 4b0146ab7b docs: use 2-space indentation for Markdown (#43537)
As noted in #39090, MkDocs requires 4 spaces for indentation (in
particular, for nested lists) whereas our Prettier/markdownlint
configuration expects 2 spaces.

This means that when trying to use i.e. nested lists, we need to ignore
prettier and markdownlint, otherwise it fails.

To handle this, we can add a Markdown hook to override the indentation
level to 2 spaces.

This also requires we update:

- admonitions
- indented text in `index.md`

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-26 09:05:42 +00:00

12 lines
209 B
Python

import markdown
_orig_init = markdown.Markdown.__init__
def _patched_init(self, **kwargs):
kwargs.setdefault('tab_length', 2)
_orig_init(self, **kwargs)
markdown.Markdown.__init__ = _patched_init