1
0
mirror of https://github.com/golang/go synced 2024-11-22 11:54:50 -07:00

\r is white space

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=27397
CL=27400
This commit is contained in:
Rob Pike 2009-04-13 19:27:35 -07:00
parent 9b3f43774a
commit a20a50b0b2

View File

@ -99,7 +99,7 @@ func (t *template) error(err *os.Error, args ...) {
}
func white(c uint8) bool {
return c == ' ' || c == '\t' || c == '\n'
return c == ' ' || c == '\t' || c == '\r' || c == '\n'
}
func (t *template) execute()
@ -126,7 +126,7 @@ Loop:
*t.linenum++;
i++;
break Loop;
case ' ', '\t':
case ' ', '\t', '\r':
// white space, do nothing
case '{':
if brace {