mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #1042] MD003 "consistent" doesn't allow "setext_with_atx" #2449
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2449
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Tweekism on GitHub (Nov 16, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1042
Hi,
I've noticed when set to the default value of consistent you aren't allowed to do:-
Even thought that would be 'consistent' with the setext_with_atx style, which we use for our plain text readable documentation.
In other words, consistent only allows either atx or setext.
Assuming that is the intended result, is there a setting that would allow either atx, setext or setext_with_atx as long as it is consistent within the one document (as setext doesn't have a way to do headings past H3)?
@DavidAnson commented on GitHub (Nov 16, 2023):
Your summary of the behavior of "consistent" is correct; it requires that the first style it encounters hold for the rest of the document.
I don't know of a setting that would allow all three flavors like you describe. That said, it sounds like your project prefers "setext_with_atx", so I am not sure why you wouldn't set that in your configuration?
@Tweekism commented on GitHub (Nov 16, 2023):
Fair point, I've set that in our VSCode workspace settings for the project.
I guess my question was more about whether or not setext_with_atx in itself should be considered a consistent style since level 1 headers are reserved for the page title that leaves you with only 1 level of headings for the body (level 2) if you are using setext only.
But maybe that doesn't really make since from a standards perspective, and seems like perhaps atx style headings are winning out in the popular landscape anyway so maybe I'm just questioning my own life decisions.
Happy to close, reason: "Original poster slowly losing his sanity"
@DavidAnson commented on GitHub (Nov 16, 2023):
It's an interesting scenario and something I hadn't realized! It's possible to implement, but it would be slightly messy and besides, I'm not even sure I'd consider a mixed style like that to be "consistent" anyway. So yes, my inclination is to close this as "unplanned".