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

Fix relativeDepth check #500

Merged
merged 2 commits into from
Nov 6, 2016

Conversation

tommcc
Copy link
Contributor

@tommcc tommcc commented Oct 3, 2016

Summary of changes:

  • Fix syntax of depth check fallback in case of files at depth 0.

When parsing files at the 0th level (e.g., markdown associated with 1st-level folders), this regex returns undefined. The|| [] was meant to guard against checking .length of undefined, but was ineffective due to this missing a pair of parentheses.

Should I attempt to add a test for this, or is it simple enough to go in as-is?

@bmuenzenmeyer
Copy link
Member

Interesting find, something that seems to have been overlooked for a long time. Sounds as if this would make patternType markdown processing easier, something I attempted but ultimately left hanging as #415.

I see this just getting a once over and merge - no need for a unit test

@bmuenzenmeyer bmuenzenmeyer merged commit 0de8279 into pattern-lab:dev Nov 6, 2016
@tommcc tommcc deleted the fix_relative_depth_check branch October 30, 2017 14:28
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