Fix/typography quotes mirroring text #8002
Open
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-structure
Files 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.