fix: git eager VCS comma author names, non-ASCII paths, json dir asse…#12137
fix: git eager VCS comma author names, non-ASCII paths, json dir asse…#12137UditDewan wants to merge 1 commit into
Conversation
…t links, og:locale
- fix(utils): parse git log author names containing commas correctly
The eager VCS strategy parsed `t:%ct,a:%an` lines with split(','), which
truncated author names like "Doe, John" to just "Doe". Now uses an anchored
regex so only the first comma (the t:/a: delimiter) splits the fields.
- fix(utils): disable core.quotepath so non-ASCII file paths are tracked
Git's default core.quotepath=true causes paths like "docs/café.md" to be
octal-escaped in --name-status output, making file-info map lookups fail
silently for all non-ASCII filenames. Now passes -c core.quotepath=false.
- fix(mdx-loader): use /\.json$/ regex for .json → .raw extension swap
The string replace('.json','.raw') replaced the first occurrence, so
a link like `../dir.json/data.json` produced `../dir.raw/data.json`.
Now anchored to the end of the path.
- fix(theme-classic): use replaceAll for og:locale BCP 47 → underscore
Multi-subtag locales like zh-Hans-CN produced zh_Hans-CN (invalid OG
locale). All dashes must be replaced, not just the first.
Each fix is covered by a regression test verified to fail on the original
code and pass after the fix.
|
Hi @UditDewan! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
…t links, og:locale
fix(utils): parse git log author names containing commas correctly The eager VCS strategy parsed
t:%ct,a:%anlines with split(','), which truncated author names like "Doe, John" to just "Doe". Now uses an anchored regex so only the first comma (the t:/a: delimiter) splits the fields.fix(utils): disable core.quotepath so non-ASCII file paths are tracked Git's default core.quotepath=true causes paths like "docs/café.md" to be octal-escaped in --name-status output, making file-info map lookups fail silently for all non-ASCII filenames. Now passes -c core.quotepath=false.
fix(mdx-loader): use /.json$/ regex for .json → .raw extension swap The string replace('.json','.raw') replaced the first occurrence, so a link like
../dir.json/data.jsonproduced../dir.raw/data.json. Now anchored to the end of the path.fix(theme-classic): use replaceAll for og:locale BCP 47 → underscore Multi-subtag locales like zh-Hans-CN produced zh_Hans-CN (invalid OG locale). All dashes must be replaced, not just the first.
Each fix is covered by a regression test verified to fail on the original code and pass after the fix.
Pre-flight checklist
Motivation
Test Plan
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
-portions of this code were generated by claude fable but were all reviewed by me and were deemed to be correct