1
0
mirror of https://github.com/golang/go synced 2024-11-21 13:54:43 -07:00

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
This commit is contained in:
Russ Cox 2011-07-29 13:47:54 -04:00
parent ffa14e849c
commit 124172e2cf

View 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
}