Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

fix(store): normalize pattern ids across platforms #287

Merged
merged 1 commit into from
Mar 9, 2018

Conversation

faselbaum
Copy link
Contributor

@faselbaum faselbaum commented Mar 8, 2018

This fixes pattern detection on windows

Copy link
Contributor

@TheReincarnator TheReincarnator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.@marionebl says split/join is not that wrong, and he convinced me.
The original paths are OS-specific, then joined OS-specific, and then we should split them OS-specific, and join again using the '/' character, as the join is a pattern ID, not a path.
Additionally, the RegEx construction is not perfectly correct. The string is a regex, but PathUtils.sep is not.
So we should split(PathUtils.sep) and join('/').

@faselbaum faselbaum force-pushed the fix/react-analyzer-windows-paths branch from 298654a to 22dccdd Compare March 8, 2018 16:04
@faselbaum
Copy link
Contributor Author

@TheReincarnator done

@TheReincarnator TheReincarnator merged commit 25b939d into master Mar 9, 2018
@faselbaum faselbaum deleted the fix/react-analyzer-windows-paths branch March 9, 2018 12:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants