go/src/text
Daniel Martí e770b5b3aa text/template: allow using -}} with many spaces
lexSpace consumed all spaces, even if the last one was part of a right
delimiter like " -}}". Thus, "3  -}}" wouldn't lex as "3" and a right
delimiter, but as "3", "-", and "}}".

To fix that, make lexSpace stop if it encounters a right delimiter.

Fixes #30948.

Change-Id: I80a5546e5809e54f6823e2bf3a57a7e8808329be
Reviewed-on: https://go-review.googlesource.com/c/go/+/168457
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
2019-03-24 09:06:14 +00:00
..
scanner text/scanner: don't liberally consume (invalid) floats or underbars 2019-02-20 20:23:28 +00:00
tabwriter text/tabwriter: use a single defer per Write call 2019-03-12 22:34:30 +00:00
template text/template: allow using -}} with many spaces 2019-03-24 09:06:14 +00:00