Skip to content

Indent setting to work with mdformat-mkdocs #12

@CBroz1

Description

@CBroz1

In my current pre-commit file, I'm running mdformat twice, once with toc and once with mkdocs so that the lists generated have 4-space indents to comply with the mkdocs norm.

Current pre-commit
  - repo: https://github.com/executablebooks/mdformat
    rev: 0.7.16
    hooks:
      - id: mdformat
        name: Format Markdown
        entry: mdformat # Executable to run, with fixed options
        language: python
        types: [markdown]
        args: [--wrap, "80", --number]
        additional_dependencies:
          - mdformat-toc

  # run twice so that the TOC is updated to 4-indent
  - repo: https://github.com/executablebooks/mdformat
    rev: 0.7.16
    hooks:
      - id: mdformat
        name: Format Markdown
        entry: mdformat # Executable to run, with fixed options
        language: python
        types: [markdown]
        args: [--wrap, "80", --number]
        additional_dependencies:
          - mdformat-mkdocs

Is it possible to add --indent X to Opts? Would the maintenance team be interested in a PR?

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