Skip to content

Section number incremented when it shouldn't #638

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

Closed
wants to merge 1 commit into from
Closed

Section number incremented when it shouldn't #638

wants to merge 1 commit into from

Conversation

ahus1
Copy link
Contributor

@ahus1 ahus1 commented Sep 9, 2019

My pull request for #628 introduced a regression: when using numbered sections using :sectnums: this produced gaps in the chapter number.

I traced it down to the following issue: when the block is created, it is assigned a "sectname". For "==" this is "chapter", and it will increase the chapter number.

This change now sets level and sectname from a temporary template node. This leads to the correct sectname, and no chapter number will be increased.

I see that #628 has been picked for the next maintenance release; maybe you want to revert/postpone it in the branch until this is taken care of.

I marked this [WIP] as it is missing a test.

@ahus1 ahus1 changed the title [WIP] section number incremented when it shouldn't section number incremented when it shouldn't Sep 9, 2019
@ahus1
Copy link
Contributor Author

ahus1 commented Sep 9, 2019

I've updated an existing test case to cover also the chapter numbering. As this has now a test, I removed the WIP.

@wilkinsona wilkinsona added type: task Non user-facing work and removed status: waiting-for-triage Untriaged issue labels Sep 10, 2019
@wilkinsona wilkinsona added this to the 2.0.4.RELEASE milestone Sep 10, 2019
@wilkinsona wilkinsona changed the title section number incremented when it shouldn't Section number incremented when it shouldn't Sep 10, 2019
@wilkinsona
Copy link
Member

Thanks again, @ahus1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task Non user-facing work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants