• Kenny Grant's avatar
    go/doc: allow : in godoc links · 497b608f
    Kenny Grant authored
    The emphasize function used a complex regexp to find URLs, which
    truncated some types of URL and did not match others.
    This has been simplified and adjusted to allow valid punctuation
    like :: or ! in the path part and :[] in the host part.
    Comments were added to clarify what this regexp allows.
    The path part matches query and fragment also so document this.
    Removed news, telnet, wais, and prospero protocols.
    
    Tests were added for:
     IPV6 URLs
     URLs surrounded by brackets
     URLs containing ::
     URLs containing :;!- in the path
    
    In order to allow punctuation and yet preserve current behaviour,
    URLs are not permitted to end in .,:;?! to allow the use of
    normal punctuation surrounding URLs in comments.
    
    Fixes #18139
    
    Change-Id: I38b2d7a85fe0d171e4bf4aac420f8c2d3ced8a2f
    Reviewed-on: https://go-review.googlesource.com/37192Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    497b608f
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...