Fix/typography quotes mirroring text#8002
Closed
sunil5151 wants to merge 4 commits intoreactjs:mainfrom
Closed
Conversation
- Replace straight quotes with HTML entities (“ ”) around 'mirroring' and 'Mirroring' - Fixes typography issue where smart quotes plugin rendered double opening quotes - Ensures consistent curly quote rendering in both instances (lines 358, 367) Resolves mismatched quote rendering in choosing-the-state-structure.md
Author
|
Please tell if it is working right or wrong i do not know , first time please give feedback 🙏🙏🙏🙏 |
Author
|
“I only changed two lines. CI shows many existing TS errors unrelated to my change. Could you confirm if I should fix them all or just scope my PR?” |
Member
|
Dupe of #7931. I commented on that PR that did a similar fix:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.