allow trailing/leading spaces for text node

to close #29