Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct header level when splitting rules list into sub-lists with --split-by #271

Merged
merged 1 commit into from Nov 23, 2022

Conversation

bmish
Copy link
Owner

@bmish bmish commented Nov 23, 2022

Header levels should increment by one for nested sections. When splitting the rules list/table into sub-lists, we should use a header level that is one greater than the previous header level seen in the file.

Example:

## Rules

<!-- begin auto-generated rules list -->

### some sub list 1

...

### some sub list 2

...

<!-- end auto-generated rules list -->

Before this fix, we always assumed the sub-lists should use ### since the ## Rules section usually uses a level 2 header. Now, we adjust the sub-list header level based on the surrounding context.

@bmish bmish added the enhancement New feature or request label Nov 23, 2022
@bmish bmish merged commit 452c039 into main Nov 23, 2022
@bmish bmish deleted the split-header-level branch November 23, 2022 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant