-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Org reader: handle minlevel
option differently.
#5190
Conversation
When `minlevel` exceeds the original minimum level observed in the file to be included, every heading should be shifted rightward.
if shift <= 0 | ||
then blk | ||
else case blk of | ||
case blk of | ||
(Header lvl attr content) -> Header (lvl - shift) attr content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding something that checks to make sure that lvl - shift
is positive, leaving things alone otherwise?
Thank you, this is looking good. I love the fact that deleting code seems to add more features. |
I think the check is needed, but I'll just merge this and add a further commit on top of it. |
Ugh, I'm really sorry for the delay--I've been busier than expected and had some computer problems as well. Yeah, the |
No worries @leungbk! Thanks for the PR. I just didn't want it to languish and be forgotten. |
When
minlevel
exceeds the original minimum level observed in thefile to be included, every heading should be shifted rightward.
Closes #5188.