Skip to content

fix: git eager VCS comma author names, non-ASCII paths, json dir asse…#12137

Open
UditDewan wants to merge 1 commit into
facebook:mainfrom
UditDewan:fix/docusaurus-bugs
Open

fix: git eager VCS comma author names, non-ASCII paths, json dir asse…#12137
UditDewan wants to merge 1 commit into
facebook:mainfrom
UditDewan:fix/docusaurus-bugs

Conversation

@UditDewan

@UditDewan UditDewan commented Jun 11, 2026

Copy link
Copy Markdown

…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.

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

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

…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.
@meta-cla

meta-cla Bot commented Jun 11, 2026

Copy link
Copy Markdown

Hi @UditDewan!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 49ab15d
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6a2a47dcf7d8fe0008e67331
😎 Deploy Preview https://deploy-preview-12137--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Jun 11, 2026
@meta-cla

meta-cla Bot commented Jun 11, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

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.

1 participant