Remove trailing closing tags to avoid extra characters when rendering or loading as a library.