support nest 'pre'  trim

1.remove extra whitespaces in tag.
2.support nest 'pre'.