]> Cypherpunks repositories - gostls13.git/commitdiff
undo CL 12822043 / 96fefaa02ae3
authorDavid Symonds <dsymonds@golang.org>
Fri, 16 Aug 2013 04:36:06 +0000 (14:36 +1000)
committerDavid Symonds <dsymonds@golang.org>
Fri, 16 Aug 2013 04:36:06 +0000 (14:36 +1000)
Fixes #6160.

««« original CL description
go/doc: permit a package synopsis to end with ":\n".

R=gri, r
CC=golang-dev
https://golang.org/cl/12822043
»»»

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13040043

src/pkg/go/doc/synopsis.go
src/pkg/go/doc/synopsis_test.go

index cef05f5c14d03e3f06958136560d3183c7b5440b..2d18174393e67201f002a8ae6f68d7e08d398464 100644 (file)
@@ -10,15 +10,12 @@ import (
 )
 
 // firstSentenceLen returns the length of the first sentence in s.
-// The sentence ends at the first colon followed by a newline,
-// or at the first period followed by space and not preceded by
-// exactly one uppercase letter.
+// The sentence ends after the first period followed by space and
+// not preceded by exactly one uppercase letter.
+//
 func firstSentenceLen(s string) int {
        var ppp, pp, p rune
        for i, q := range s {
-               if p == ':' && q == '\n' {
-                       return i
-               }
                if q == '\n' || q == '\r' || q == '\t' {
                        q = ' '
                }
index d806fe45bb167cf8208e74052f1de9011532b2a4..fd7081a07c2c6adc3758192c2b6ed50c9ecbf1e7 100644 (file)
@@ -29,7 +29,6 @@ var tests = []struct {
        {"Package Καλημέρα κόσμε.", 36, "Package Καλημέρα κόσμε."},
        {"Package こんにちは 世界\n", 31, "Package こんにちは 世界"},
        {"Package foo does bar.", 21, "Package foo does bar."},
-       {"Package foo does these things:\n  - a\n  - b", 30, "Package foo does these things:"},
        {"Copyright 2012 Google, Inc. Package foo does bar.", 27, ""},
        {"All Rights reserved. Package foo does bar.", 20, ""},
        {"All rights reserved. Package foo does bar.", 20, ""},