]> Cypherpunks repositories - gostls13.git/commitdiff
enable test and fix bug in white space before {
authorRob Pike <r@golang.org>
Tue, 14 Apr 2009 03:37:24 +0000 (20:37 -0700)
committerRob Pike <r@golang.org>
Tue, 14 Apr 2009 03:37:24 +0000 (20:37 -0700)
R=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=27404
CL=27404

src/lib/template/template.go
src/lib/template/template_test.go

index 274d9bf886351e3414e513d629cc972eabf66044..1881b5abb51d1d83d8d3ae1b9c08fec347890397 100644 (file)
@@ -141,7 +141,7 @@ Loop:
                                if trim_white && only_white {
                                        start = i;
                                }
-                       } else if i > t.p+1 {  // have some text accumulated so stop before '{'
+                       } else if i > t.p {  // have some text accumulated so stop before '{'
                                break Loop;
                        }
                        brace = true;
index 0280fa924127825fe94c266ffa39b73182ec6858..324b08de1b3a4ae35b54cb9c48cd6ea9cec96eab 100644 (file)
@@ -158,11 +158,11 @@ var tests = []*Test {
        },
        
        // Bugs
-//     &Test{
-//             "{.section data}{.end} {header}\n",
-//             
-//             " 77\n"
-//     },
+       &Test{
+               "{.section data}{.end} {integer}\n",
+
+               " 77\n"
+       },
 }
 
 func TestAll(t *testing.T) {