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

sort correctly when subsection appears before file #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreaswachowski
Copy link

When comparing the title when the child is an object, the associated folder-structure is ignored, which leads to weird results. This fix will recursively look for a string-child, thus preserving the folder structure in the comparison and maintaining the desired sort order.

Try the test case without the fix: The main sections will switch places, so that section 02 appears before section 01.

This only happens, however, with a subsection (here 01-section/a) that is alphabetically before the second child (here 01-section/b). When the folder a were renamed to c, the original logic works as expected.

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.

1 participant