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 regex for non english versioned docs #412

Merged
merged 1 commit into from
Jan 23, 2018

Conversation

sunnylqm
Copy link
Contributor

Previously the regex was in greedy mode which would cause a bug.
For example, if the file path looks like
/translated_docs/zh-CN/version-0.52/alert.md
then the matched part would be zh-CN/version-0.52 which is obviously wrong for language detection.

@JoelMarcey
Copy link
Contributor

@sunnylqm Thank you very much. Very nice catch.

I just tested your change, and, indeed, that is a bug.

@JoelMarcey
Copy link
Contributor

Broken:

screenshot 2018-01-23 13 22 29

Fix:

screenshot 2018-01-23 13 22 36

@JoelMarcey JoelMarcey merged commit 43e80fc into facebook:master Jan 23, 2018
@sunnylqm sunnylqm deleted the patch-1 branch June 12, 2018 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants