The tool currently handles the headings as separate units by default and issues a separate unit of translate wrappers, which shouldn't be the case. Instead, we keep an empty line after every heading to separate the translation unit, and not issue separate translate wrappers.
==Heading== Lorem ipsum
The result is:
<translate> ==Heading== </translate> <translate>Lorem ipsum</translate>
The ideal is:
<translate> ==Heading== Lorem ipsum</translate>