Preserve single space characters in TemplateOptimizer