Scope MD007 to samples/ instead of individual files - #30
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #26.
MD007: {indent: 4}moves from per-filemarkdownlint-configure-filecomments to a directory config atsamples/.markdownlint-cli2.yaml.The rule is not a property of the sample documents. Python-Markdown uses
tab_length = 4, so a sublist indented by 2 spaces renders as a sibling rather than a child — every file published through MkDocs is subject to it. Keeping it in per-file comments meant a new sample file would silently lose it, and coverage was already incomplete: the rule sat on the twomanualsamples only, because that is where violations existed when it was relocated ine64fdc3. Theapi-referencesamples run through the same renderer and would have mis-rendered a three-level list without warning.MD046andMD033stay as per-file comments — pymdownx content tabs and the API-reference badge spans really are specific to the documents that use them.Verification
Each acceptance criterion was checked with a throwaway fixture, removed afterwards. Final tree lints clean (
Summary: 0 issues in 0 files).samples/is protected without a commentsamples/_tmp-nest.md, 2-space three-level listMD007now coversapi-referencetoosamples/api-reference/docs/en/MD007does not leak outsidesamples/MD024: siblings_onlystill applies undersamples/### Detailunder two different##parentsNo sample content changed. The only edit to the two
manualfiles is the comment line.