Currently line breaks in a header value – that is the newline character \n and a following space – are removed when determining the text of the header value.
This approach is working OK as long as no annotations for parts of the text are set. If annotations for parts of the header value text are created they will become incorrect after the first line break since for creating the annotations – currently only while parsing version numbers – only the filtered text is considered.
Some kind of conversion mechanism must be provided that converts between text ranges based on the filtered text and text ranges based on the actual text.