From 124172e2cfe55f1bfefb5e478a42ae3b29e62478 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 29 Jul 2011 13:47:54 -0400 Subject: [PATCH] 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 --- src/cmd/godoc/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/godoc/utils.go b/src/cmd/godoc/utils.go index 5b3ec41b6bc..11e46aee502 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 }