Skip to content

Fix _get_by_type for Section#2203

Merged
waylan merged 1 commit intomkdocs:masterfrom
lukasgeiter:fix/get-by-type
Oct 28, 2020
Merged

Fix _get_by_type for Section#2203
waylan merged 1 commit intomkdocs:masterfrom
lukasgeiter:fix/get-by-type

Conversation

@lukasgeiter
Copy link
Copy Markdown
Contributor

I noticed that the _get_by_type function doesn't work properly when used to find nested Section items. Since the if condition is true, it would not actually traverse the children of sections.

This is currently not causing any problems because MkDocs only uses the function with Page and Link. But I thought it would be a good idea to fix it anyway, in case that changes in the future.

@waylan
Copy link
Copy Markdown
Contributor

waylan commented Oct 27, 2020

This needs a note added to the release notes as well as a test which fails before the change is made and passes after.

@waylan waylan merged commit 00b62aa into mkdocs:master Oct 28, 2020
@lukasgeiter lukasgeiter deleted the fix/get-by-type branch October 28, 2020 18:36
@waylan waylan added this to the 1.2 milestone Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants