mdsmith
Esc
    v0.52.0 GitHub
    MDS046 list ready

    MDS046: ordered-list-numbering

    Ordered list items must be numbered in the configured style.

    # Settings

    SettingTypeDefaultDescription
    stylestring"sequential""sequential" (1. 2. 3.) or "all-ones" (1. 1. 1.)
    startint1Required first number for every ordered list

    # Config

    Enable with sequential numbering:

    rules:
      ordered-list-numbering:
        style: sequential
        start: 1

    Disable (default):

    rules:
      ordered-list-numbering: false

    All-ones style (insertion-friendly):

    rules:
      ordered-list-numbering:
        style: all-ones
        start: 1

    # Examples

    # Good – sequential

    # Title
    
    1. first item
    2. second item
    3. third item

    # Good – all-ones

    # Title
    
    1. first item
    1. second item
    1. third item

    # Bad – sequential style with all-ones source

    # Title
    
    1. first item
    1. second item
    1. third item

    # Bad – wrong start

    # Title
    
    5. first item
    6. second item

    # Diagnostics

    • ordered list starts at {actual}; configured start is {expected} — the first item’s number does not match the configured start. Fires once per list, on the first item’s line.
    • ordered list item {position} numbered {actual}; expected {expected} — an item later in the list deviates from the expected number under the configured style.

    # Edge Cases

    When the fix changes a marker’s digit width (for example, item 10 growing from 1. to 10.), the rule re-indents the item’s continuation lines and any nested blocks so the content column still aligns with the new marker prefix. Blank lines inside the item are left unchanged so the fix does not introduce trailing whitespace.

    Each list is checked independently. A nested ordered list inside a list item is treated as its own list. The outer list’s style does not exempt the nested list.

    When a list’s first item starts at a number different from the configured start, the rule emits only the start-mismatch diagnostic for that list. Per-item diagnostics would use the configured start as their baseline, matching what auto-fix produces. Reporting them alongside “wrong start” would name renumbering that the start fix already covers.

    # Meta-Information

    • ID: MDS046
    • Name: ordered-list-numbering
    • Status: ready
    • Default: disabled
    • Fixable: yes
    • Implementation: source
    • Category: list
    • markdownlint: MD029 (ol-prefix)
    • rumdl: MD029 (ol-prefix)
    • mado: MD029 (ol-prefix)
    • obsidian-linter: ordered-list-style