akiomik/mado

MD007 breaks on correct 2nd layer unordered list indentation

Open

#190 创建于 2025年8月14日

在 GitHub 查看
 (2 评论) (3 反应) (1 负责人)Rust (10 fork)auto 404
buggood first issue

仓库指标

Star
 (379 star)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南