Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug mkdocs indent issues #2

Merged
merged 7 commits into from
Apr 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat!: use 2-spaces for bullet indents
KyleKing committed Apr 6, 2023
commit 813644aca943289254c5594f78faa20062fb71d4
5 changes: 3 additions & 2 deletions mdformat_mkdocs/plugin.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import re
from os import environ
from typing import Dict, Mapping

from markdown_it import MarkdownIt
from mdformat.renderer import RenderContext, RenderTreeNode
from mdformat.renderer.typing import Postprocess, Render

_MKDOCS_INDENT_COUNT = 4
"""Use 4-spaces for mkdocs."""
_MKDOCS_INDENT_COUNT = int(environ.get("MDFORMAT_MKDOCS_INDENT_COUNT", "2"))
"""Use 2-spaces for mkdocs or whichever environment variable is configured."""


def update_mdit(mdit: MarkdownIt) -> None: