Skip to content

no-empty-sections (MD082) - option to allow empty section when the next heading is a subheading #718

Description

@DetachHead

Problem or motivation

i personally don't consider it an issue for a section to contain no content, when followed by subheadings, because those subheadings should be considered part of the parent heading's content

Proposed solution

an option for no-empty-sections to allow "empty" sections as long as it contains subheadings

Alternatives considered

No response

Feature category

Improve existing rule

Example markdown

<!-- this should be fine: -->
# H1

## H2

content...


<!-- but this isn't: -->
# H1

# H1

content...

Contribution

  • I would be willing to submit a PR to implement this feature

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions