akiomik/mado

MD007 breaks on correct 2nd layer unordered list indentation

Open

#190 aperta il 14 ago 2025

Vedi su GitHub
 (2 commenti) (3 reazioni) (1 assegnatario)Rust (10 fork)auto 404
buggood first issue

Metriche repository

Star
 (379 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Hi! 👋

I'm using mado in some of my projects and noticed, that it seems broken around the validation of MD007. When choosing e.g. indent to be 4, multiples of 4 are considered wrong. When choosing indent to be 3 (the default according to the rule), multiples of 3 only some multiples of 3 are considered to be correct.

With the following configuration:

# ..
[lint.md007]
indent = 4
# ..

This works (but baz is then not rendered in e.g. mdbook as a subsubitem):

- foo
    - bar (4 spaces)
          - baz (10 spaces)

But this does not work (however, this renders correctly in mdbook):

- foo
    - bar (4 spaces)
        - baz (8 spaces)

When using the following configuration (which should reflect the defaults for MD007), the behavior of multiples of indent also does not work as expected:

# ..
[lint.md007]
indent = 3
# ..

This works:

- foo
   - bar (3 spaces)
         - baz (9 spaces)

This does not work:

- foo
   - bar (3 spaces)
      - baz (6 spaces)

However, when the mado.toml does not contain a specific [lint.md007] section, the default appears to not be indent = 3, as a consecutive indentation (and multiple) of 3 is considered an error.

Guida contributor