implement whitespace control like handlebars.js
fix #251