mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #736] MD035 is triggered by horizontal line in list #528
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#528
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 @NomarCub on GitHub (Mar 5, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/736
hr-styletriggers for consistent styles that are inside a list. Here's an example of valid markdown:@nschonni commented on GitHub (Mar 5, 2023):
You'll notice that the HRs actually breakup the list and aren't treated as part of the list
@DavidAnson commented on GitHub (Mar 5, 2023):
The sample as presented does not produce MD035 warnings for me. However, adding another horizontal rule to the top of the sample with the same style does produce a warning which I agree is inappropriate: https://dlaa.me/markdownlint/#%25m%23%20Issue%20736%0A%0A---%0A%0A-%20a%0A%20%20-%20b%0A%20%20-%20---%0A%20%20-%20c%0A-%20d%0A-%20---%0A-%20e%0A
@NomarCub commented on GitHub (Mar 5, 2023):
I've sat on this a little, and I can see now that the markdown based app I use (Obsidian) also processes
- ---as an hr, not a list item. It just looked the way I thought it should. So my original point is moot.Is the conclusion that the rule should produce a warning both for my text and yours? Or for neither? @DavidAnson
@DavidAnson commented on GitHub (Mar 5, 2023):
It sounds like your original issue may have been a misunderstanding, but I think there is a legitimate problem revealed by the sample i link to above. I will try to fix that problem. I can either use this issue as a reminder or you can close it if you'd like and I will leave myself a note on my private TODO list.
@NomarCub commented on GitHub (Mar 5, 2023):
Sure, I get the sequence of events, and I'll leave this open. You might want to rename it to reflect the actual problem for others stumbling onto it in the meantime.
And my last question still stands. I had my example text and you posted yours. Should the rule should produce a warning both for my text and yours, or for neither?
@DavidAnson commented on GitHub (Mar 5, 2023):
The horizontal rule style in your original sample is consistent, so there should be no warnings for that – and there are not. The style is also consistent in the modified version I link to so there should not be warnings there – but there are. That is the bug and once I fix it, neither example will produce a warning about inconsistent horizontal rule style.
@NomarCub commented on GitHub (Mar 6, 2023):
That's what I wanted originally too. But now I see that
- ---gets interpreted as---by CommonMark, so it really does seem like an inconsistent hr. What's the rationale behind not giving a warning?@DavidAnson commented on GitHub (Mar 6, 2023):
Every HR in your example uses the same "---" style, so there should be no warning of inconsistency. If one of them used the "***" style, I would expect a warning for the mixed use.
markdownlint-configure-fileDirective Does Not Allow JSON5 Comments #2279