1
0
mirror of https://github.com/golang/go synced 2024-11-26 05:57:58 -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 { func white(c uint8) bool {
return c == ' ' || c == '\t' || c == '\n' return c == ' ' || c == '\t' || c == '\r' || c == '\n'
} }
func (t *template) execute() func (t *template) execute()
@ -126,7 +126,7 @@ Loop:
*t.linenum++; *t.linenum++;
i++; i++;
break Loop; break Loop;
case ' ', '\t': case ' ', '\t', '\r':
// white space, do nothing // white space, do nothing
case '{': case '{':
if brace { if brace {