Skip to content

Numbered list with code block, should code block be 4 space deep? #6

Closed as not planned
@jamesbraza

Description

@jamesbraza

Similar issue to #4, now with code blocks in numbered lists:

  1. Item 1
    with a semantic line feed

    echo "I get moved around by prettier/mdformat, originally I am 3 spaces deep"
  2. Item 2

  3. Item 3

I have prettier (.prettierrc.toml: tabWidth = 4) and mdformat, together in pre-commit:

    - repo: https://github.com/pre-commit/mirrors-prettier
      rev: v3.0.0
      hooks:
          - id: prettier
    - repo: https://github.com/executablebooks/mdformat
      rev: 0.7.16
      hooks:
          - id: mdformat
            additional_dependencies:
                - mdformat-black
                - mdformat-footnote
                - mdformat-frontmatter
                - mdformat-gfm
                - mdformat-mkdocs>=1.0.2rc2
            args: [--align-semantic-breaks-in-numbered-lists]

Disclaimer: this may not be something mdformat-mkdocs solves.

I am wondering, should mdformat-mkdocs have been spacing the code block to 4-spaces?

Seems like (non-MkDocs) Markdown renderer is the same for both 3-spaces or 4-spaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions