mirror of
https://github.com/golang/go
synced 2024-11-21 19:24:45 -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:
parent
ffa14e849c
commit
124172e2cf
@ -123,7 +123,7 @@ func isText(s []byte) bool {
|
|||||||
// last char may be incomplete - ignore
|
// last char may be incomplete - ignore
|
||||||
break
|
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
|
// decoding error or control character - not a text file
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user