Skip to main content
8 of 8
replaced http://tools.ietf.org/html/rfc with https://www.rfc-editor.org/rfc/rfc

URLs wrapped in <> are not parsing correctly in comments

In the comments on StackOverflow, http://en.wikipedia.org/wiki/Inotify was misparsed to include the trailing angle bracket. Also there was a semi-colon after it for some reason. See my comment below for an example.

In RFC 3986 Appendix C. Delimiting a URI in Context, three ways are suggested to indicate that a bit of text is a URL.

  1. Angle brackets like <http://en.wikipedia.org/wiki/Inotify>
  2. Quotes like "http://en.wikipedia.org/wiki/Inotify"
  3. Whitespace like http://en.wikipedia.org/wiki/Inotify

Angle brackets are "especially recommended" in the RFC.

Markdown syntax also automatically links angle brackets and SO's editing help mentions it. The comment formatting help doesn't say comments auto-link differently. Comments do auto-link, why do it different?

Thanks for looking. I know free-form URL parsing is a pain, I maintain a library myself.

UPDATE: As you can see in this example -- http://en.wikipedia.org/wiki/Inotify -- the posting grammar knows how to deal with URLs in angle brackets. Why not in comments? They both do auto-linking. Unless there's some other benefit to the user they should do them the same to avoid confusion. This allows users to learn just ONE set of quirks, not two.

Schwern
  • 390
  • 3
  • 10