Skip to content

Should John Smith (MD,PhD) read the credentials when the comma has no space beside it? It gives nickname MD,PhD today #1268

Closed as not planned

Description

@derek73

A bracketed clause holding credentials is read as credentials when its comma has a space beside it, but as a nickname when the comma touches both words:

>>> parse("John Smith (MD, PhD)")    # suffix 'MD, PhD'
>>> parse("John Smith (MD ,PhD)")    # suffix 'MD, PhD'
>>> parse("John Smith (MD,PhD)")     # nickname 'MD,PhD'
>>> parse("John Smith (Dr., PhD)")  # title 'Dr.', suffix 'PhD'
>>> parse("John Smith (Dr.,PhD)")   # nickname 'Dr.,PhD'
>>> parse("John Smith (MD;PhD)")     # nickname 'MD;PhD'

Outside brackets the same glued comma already divides: Smith,John reads family 'Smith', given 'John', and John Smith, MD,PhD reads suffix 'MD, PhD'. Only the bracketed clause keeps the glued pair as one word, so rules/S1 (a bracketed credential is not a nickname) and rules/S13 (a bracketed member settled by its writing) never see two members. John Smith (Jr.,MD) happens to land in the suffix, but as the single unsplit word Jr.,MD.

This matters most for the fullwidth comma ,, which CJK text usually writes with no space after it. #1266 made every comma in COMMA_CHARS read the way the ASCII comma does, so the gap now affects all of them equally rather than one script more than another.

Open questions:

  • Should a clause divide at a glued comma only when every resulting piece is a credential or title (the S1 test), so that Jane (Janey,Jo) Smith keeps nickname Janey,Jo? Or should it always divide, so that one becomes nickname Janey, Jo?
  • Should the ; delimiter follow the same rule inside a clause?

Activity

  1. self-assigned this
    on Nov 9, 2026
  2. added
    suffixesGenerational suffixes and credentials (rules/S)
    nicknamesNicknames, brackets and quoted names (rules/N)
    on Nov 9, 2026
  3. added this to the 3.1 milestone on Nov 10, 2026
  4. added 7 commits that reference this issue on Nov 11, 2026
  5. modified the milestones: 3.1, 3.2 on Nov 14, 2026
  6. derek73 commented on Nov 17, 2026

    @derek73
    OwnerAuthor

    Closing as an accepted limit. John Smith (MD,PhD), with no space beside the comma, keeps reading as nickname MD,PhD; (MD, PhD) and (M.D.,Ph.D.) read as credentials.

    Two designs were tried in #1339 and neither held up in review: dividing at the comma while tokenizing reached every bracketed clause, nicknames included, and reading the halves of the undivided word made one word stand for several credentials. The shape is rare: ClinicalTrials.gov holds 9 names with a comma glued in parentheses, none reading differently from its spaced form, and ORCID holds 6, of which 3 do (measured 2026-11-11).

    The limit and both declined designs are recorded in docs/design/rules/S1-bracketed-credential-is-not-a-nickname.md and its decisions file (#1342). A caller with such data can add the space before parsing.

  7. removed this from the 3.2 milestone on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

by-designnicknamesNicknames, brackets and quoted names (rules/N)suffixesGenerational suffixes and credentials (rules/S)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions