mirror of
https://github.com/golang/go
synced 2024-11-22 21:10:03 -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:
parent
9b3f43774a
commit
a20a50b0b2
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user