From: Russ Cox Date: Fri, 29 Jul 2011 17:47:54 +0000 (-0400) Subject: godoc: allow form feed in text files X-Git-Tag: weekly.2011-07-29~4 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=124172e2cfe55f1bfefb5e478a42ae3b29e62478;p=gostls13.git godoc: allow form feed in text files Now recognizes misc/emacs/go-mode-load.el as text. Fixes #2115. R=gri CC=golang-dev https://golang.org/cl/4801061 --- diff --git a/src/cmd/godoc/utils.go b/src/cmd/godoc/utils.go index 5b3ec41b6b..11e46aee50 100644 --- a/src/cmd/godoc/utils.go +++ b/src/cmd/godoc/utils.go @@ -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 }