Allow for heading range to end at heading with higher depth
Murderlon opened this issue · 5 comments
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Problem
The document I'm formatting looks like this in terms of headings:
<!-- more above -->
### `getUploadParameters(file)`
### `locale: {}`
## S3 Bucket configuration
## POST uploads
## S3 alternatives
### DigitalOcean Spaces
### Google Cloud Storage
#### JSON CORS configuration
## Examples
### Generating a presigned upload URL server-side
### Retrieving presign parameters of the uploaded fileI'm using headingRange with locale: {} passed as string.
As the readme.md states:
A “section” is a heading that passes test, until the next heading of the same or lower depth [...]
This means the entire document after locale: {} is deleted but for my use case it would be required to also stop at the next heading of a higher depth.
Solution
Perhaps an options.endAtNextHeading (boolean, default false)
Alternatives
- Make the new default to also stop at a heading of a higher depth. This would be a breaking change.
- Something more granular, an option to pass an array of heading depths to end at. Overkill?
- Suggest
mdast-zoneif you want this. Although not preferable.
wait, you’re looking for locale, and it doesn’t stop at S3 Bucket configuration?
Can confirm that something weird happened at some point, I don't know how, but it seems to work now so this can be ignored.
Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.
weird!