Fix/typography quotes mirroring text #8002#8003
Fix/typography quotes mirroring text #8002#8003sunilsonumonu12 wants to merge 1 commit intoreactjs:mainfrom
Conversation
|
Hi @sunilsonumonu12! 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! |
|
Dupe of #7931. I commented on that PR that did a similar fix:
|
Problem
The word "Mirroring" on line 367 of choosing-the-state-structure.md was rendering with mismatched smart quotes (two opening quotes) instead of proper opening and closing curly quotes, while "mirroring" on line 358 rendered correctly.
Before:
Root Cause
The smart quotes typography plugin (
retext-smartypants) in the docs build pipeline incorrectly converts straight quotes when a quoted word appears at the beginning of a line or after certain punctuation, treating both quotes as opening quotes instead of distinguishing between opening and closing quotes.Solution
Replaced straight quotes
"with explicit HTML entities to ensure consistent rendering:“for opening quotes (")”for closing quotes (")Applied to both instances on lines 358 and 367 for consistency and to prevent future typography issues.
Testing
http://localhost:5173/learn/choosing-the-state-structureFiles Changed
Type of Change
Screenshots
After fix: Both instances now render with proper curly quotes:
Thank you for maintaining such excellent documentation! This small fix improves the reading experience and typography consistency across the React docs.