break
}
}
- if trimSpace {
- start = i
- } else if i > start {
+ if !trimSpace && i > start {
// white space is valid text
t.p = i
return t.buf[start:i]
i += len(t.ldelim) // position after delimiter
if i+1 < len(t.buf) && (t.buf[i] == '.' || t.buf[i] == '#') {
special = true
+ if trimSpace {
+ start = i - len(t.ldelim)
+ }
}
for ; i < len(t.buf); i++ {
if t.buf[i] == '\n' {
&Test{" {.space} \n", " ", ""},
&Test{" {.tab} \n", "\t", ""},
&Test{" {#comment} \n", "", ""},
+ &Test{"\tSome Text\t\n", "\tSome Text\t\n", ""},
// Variables at top level
&Test{