From 5b0c52d48780454e55b7ab0dd1484c07b29ac8e8 Mon Sep 17 00:00:00 2001 From: sehkone Date: Sat, 8 Aug 2026 07:30:16 +0900 Subject: [PATCH] Scope MD007 to samples/ instead of individual files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MD007 is not a property of the two sample files that carried it. It follows from the renderer: Python-Markdown uses tab_length = 4, so a sublist indented by 2 spaces renders as a sibling rather than a child. Every file under samples/ is published through MkDocs, so the rule belongs to the directory. Holding it in per-file comments left two gaps. A sample file added later gets no MD007 unless someone remembers the comment, and coverage was already incomplete — the rule sat on the two manual samples only, because that is where violations existed when it was relocated. The api-reference samples run through the same Python-Markdown and would have mis-rendered a three-level list silently. MD046 and MD033 stay as per-file comments. Content tabs and the badge spans really are specific to the documents that use them. The root config is untouched; markdownlint-cli2 merges the directory config with it, so the MD024 baseline still applies under samples/. Closes #26 --- samples/.markdownlint-cli2.yaml | 12 ++++++++++++ samples/manual/docs/en/index.md | 2 +- samples/manual/docs/ko/index.md | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 samples/.markdownlint-cli2.yaml diff --git a/samples/.markdownlint-cli2.yaml b/samples/.markdownlint-cli2.yaml new file mode 100644 index 0000000..22e1c24 --- /dev/null +++ b/samples/.markdownlint-cli2.yaml @@ -0,0 +1,12 @@ +# Rendering requirement, not a style preference. Python-Markdown uses +# `tab_length = 4`, so a sublist indented by 2 spaces renders as a +# sibling rather than a child. Every file under this directory is +# published through MkDocs, so the rule belongs to the directory rather +# than to the files that happen to nest lists today. +# +# Rules that really are file-specific — MD046 for pymdownx content tabs, +# MD033 for the API-reference badge spans — stay as per-file +# `markdownlint-configure-file` comments. +config: + MD007: + indent: 4 diff --git a/samples/manual/docs/en/index.md b/samples/manual/docs/en/index.md index c8e739a..d38ce40 100644 --- a/samples/manual/docs/en/index.md +++ b/samples/manual/docs/en/index.md @@ -1,4 +1,4 @@ - + # Sample Manual diff --git a/samples/manual/docs/ko/index.md b/samples/manual/docs/ko/index.md index da819ae..9847f96 100644 --- a/samples/manual/docs/ko/index.md +++ b/samples/manual/docs/ko/index.md @@ -1,4 +1,4 @@ - + # 샘플 매뉴얼