]> Cypherpunks repositories - gostls13.git/commitdiff
\r is white space
authorRob Pike <r@golang.org>
Tue, 14 Apr 2009 02:27:35 +0000 (19:27 -0700)
committerRob Pike <r@golang.org>
Tue, 14 Apr 2009 02:27:35 +0000 (19:27 -0700)
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=27397
CL=27400

src/lib/template/template.go

index 824b9d626b248335237a2e529d62ce2bd7197c84..a40a8b86ca7d1724e09b557d30cb44e15dca4c31 100644 (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 {