diff --git a/src/lib/template/template.go b/src/lib/template/template.go index 274d9bf8863..1881b5abb51 100644 --- a/src/lib/template/template.go +++ b/src/lib/template/template.go @@ -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; diff --git a/src/lib/template/template_test.go b/src/lib/template/template_test.go index 0280fa92412..324b08de1b3 100644 --- a/src/lib/template/template_test.go +++ b/src/lib/template/template_test.go @@ -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) {