Skip to content

go/doc: reconsider comment rewrites of '' to  #54312

@kortschak

Description

@kortschak

In ae3d890 as part of addressing #51082, a change was made to go/doc that rewrite all '' to . This makes semantic changes to comments where ' is used as a prime and '' is used as double prime, common in mathematical code.

This was raised in #51082 (comment) but essentially disregarded. A work around was suggested,

as a workaround, you could replace those with U+2032 PRIME and U+2033 DOUBLE PRIME. That is, f'f′ and f''f″. (Those may look the same depending on your font.)

However on investigation with relevant fonts (the font here and the font used by pkg.go.dev) at 100%, U+2033 DOUBLE PRIME is barely distinguishable from U+2032 PRIME and worse, also barely distinguishable from other commonly used marks in the same position such as '*' (Comparison: f′ f″ f* ).

The change has made it harder to read these comments, harder to write them in a way that doesn't get mutated and easier for incorrectly formatted comments to be committed (f'' getting mutated to f” which is essentially indistinguishable from f″ at normal font sizes).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Accepted

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions