]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: allow form feed in text files
authorRuss Cox <rsc@golang.org>
Fri, 29 Jul 2011 17:47:54 +0000 (13:47 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 29 Jul 2011 17:47:54 +0000 (13:47 -0400)
Now recognizes misc/emacs/go-mode-load.el as text.

Fixes #2115.

R=gri
CC=golang-dev
https://golang.org/cl/4801061

src/cmd/godoc/utils.go

index 5b3ec41b6bc407317e2fceac04add43f984116b7..11e46aee50290c4bfd25ce8ec295cafc380892c1 100644 (file)
@@ -123,7 +123,7 @@ func isText(s []byte) bool {
                        // last char may be incomplete - ignore
                        break
                }
-               if c == 0xFFFD || c < ' ' && c != '\n' && c != '\t' {
+               if c == 0xFFFD || c < ' ' && c != '\n' && c != '\t' && c != '\f' {
                        // decoding error or control character - not a text file
                        return false
                }