You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing #2183, a line caught my because it replaced the apostrophes (U+00027) in contractions with right single quotation marks (U+02019).
For consistency, document encoding, HTML character encoding, and documentation build process purposes, consider normalizing on a single style and updating tooling (linter, builder) to catch/correct these cases.
In order to get a sense of the patterns used in our existing content, I searched the .md files in this repo for a variety of contractions using both characters. For each contraction, the regular expression used followed the pattern \w<Character><Abbreviation>, where <Character> is either ' or ’ and <Abbreviation> was the abbreviated second word in the contraction. For example, \w's would match let's and \w’s would match let’s.
' (U+00027) regexp
' (U+00027) occurrences
’ (U+02019) regexp
’ (U+02019) occurrences
\w's
188 results, 45 files
\w’s
238 results, 51 files
\w't
120 results, 31 files
\w’t
77 results, 29 files
\w're
25 results, 17 files
\w’re
19 results, 13 files
\w've
13 results, 8 files
\w’ve
13 results, 10 files
\w'll
7 results, 6 files
\w’ll
10 results, 8 files
\w'd
8 results, 3 files
\w’d
5 results, 5 files
\w'(s|t|re|ve|ll)
353 results, 56 files
\w’(s|t|re|ve|ll)
357 results, 57 files
The HTML entities ’ and ’ do not appear source files.
@dotproto I can't find anything that suggests there's an underlying HTML best practice reason for not using curly quotes for an apostrophe. There also appears to be nothing in our MDN style guide. So the fallback is the Microsoft guide or the Chicago manual.
Interestingly, the Microsoft guide on apostrophes mixes both on its page (although admittedly the only one smart quote version in a title). When the Microsoft guide discusses quote topography, it only mentions straight quotes in relation to feet and inches and their use in the Segoe font (because it doesn't support smart quotes). I can't access the content in the Chicago guide (a subscription is needed). However, the blog post “Smart” Apostrophes suggests the use of smart quotes in contractions.
Also, the Google developer guide recommends using straight quotes only due to issues with writing and reviewing content.
Otherwise, the most prevalent advice appears to be to use smart quotes.
Activity
dotproto commentedon Oct 23, 2025
In order to get a sense of the patterns used in our existing content, I searched the
.mdfiles in this repo for a variety of contractions using both characters. For each contraction, the regular expression used followed the pattern\w<Character><Abbreviation>, where<Character>is either'or’and<Abbreviation>was the abbreviated second word in the contraction. For example,\w'swould matchlet'sand\w’swould matchlet’s.'(U+00027) regexp'(U+00027) occurrences’(U+02019) regexp’(U+02019) occurrences\w's\w’s\w't\w’t\w're\w’re\w've\w’ve\w'll\w’ll\w'd\w’d\w'(s|t|re|ve|ll)\w’(s|t|re|ve|ll)The HTML entities
’and’do not appear source files.rebloor commentedon Oct 24, 2025
@dotproto I can't find anything that suggests there's an underlying HTML best practice reason for not using curly quotes for an apostrophe. There also appears to be nothing in our MDN style guide. So the fallback is the Microsoft guide or the Chicago manual.
Interestingly, the Microsoft guide on apostrophes mixes both on its page (although admittedly the only one smart quote version in a title). When the Microsoft guide discusses quote topography, it only mentions straight quotes in relation to feet and inches and their use in the Segoe font (because it doesn't support smart quotes). I can't access the content in the Chicago guide (a subscription is needed). However, the blog post “Smart” Apostrophes suggests the use of smart quotes in contractions.
Also, the Google developer guide recommends using straight quotes only due to issues with writing and reviewing content.
Otherwise, the most prevalent advice appears to be to use smart quotes.