Skip to content

sort correctly when subsection appears before file#57

Open
andreaswachowski wants to merge 1 commit intoozum:masterfrom
andreaswachowski:fix-ordering
Open

sort correctly when subsection appears before file#57
andreaswachowski wants to merge 1 commit intoozum:masterfrom
andreaswachowski:fix-ordering

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