Skip to content

Contraction characters and formatting #2200

Open

Description

@dotproto

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.

Originally posted by @dotproto in #2183 (comment)

Activity

  1. dotproto commented on Oct 23, 2025

    @dotproto
    ContributorAuthor

    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 &rsquo; and &#8217; do not appear source files.

  2. rebloor commented on Oct 24, 2025

    @rebloor
    Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions