-
Notifications
You must be signed in to change notification settings - Fork 61
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
📂 Drop folders in pattern
expansion
#1399
Conversation
pattern
expansinpattern
expansino
pattern
expansinopattern
expansion
0888049
to
4db5344
Compare
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.
Only one critical change (warn about ignored children) - but I'd also love to see some of the tests persist, so the new behavior is clear.
pattern
expansionpattern
expansion
555e8a4
to
d00232c
Compare
obj[part] = objFromPathParts(remainingParts, obj[part]); | ||
return obj; | ||
} | ||
export function comparePaths(a: string, b: string): number { |
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.
@fwkoch this function now performs the directory-sensitive string comparison:
- Paths with non-matching directories are nat-sorted
- Paths with matching directories are nat-sorted if neither file is an index, or both files are index files
- Paths with non-matching directories are sorted in preference of the index file if one file is an index
Does this match your expectations?
d00232c
to
2abda04
Compare
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.
I like this much better. There's still a couple subtle differences between pattern expansion and implicit toc construction, but I don't think they matter? Just wanted to mention them so we are clear that the differences are intentional.
This PR addresses #1323 by:
file
entriespattern
entries withchildren
-- in the schema,pattern
entries can only be leaves.