Most of the time, X12 data will be:
ISA...................' envelope header
GS function group start
...
GE function group end
IEA envelope footer
In order to calculate what comes after each segment, the lexer goes from pos=105 until it hits the GS segment. There can be CR,LF,spaces,nothing, as you wish, as long as it is consistent.
This patch changes that to search for GS or IEA, as it is valid to have an empty envelope. Not very common or useful, as what's the point? But it is valid.
ie:
ISA...................'
IEA....f'
When my software generated an empty envelope it took me a while to work out the problem, as I was distracted by all the red in my data output window and I spent too long tracking down why it was invalid. Hence this fix!
Its much better to include an example file as it is difficult to decipher descriptions into text that can be fed into lexers and can become test cases.
Here is an example that may match the description.
Lexilla is a separate project now and issues should go there.
https://github.com/ScintillaOrg/lexilla
Committed with
https://github.com/ScintillaOrg/lexilla/commit/beb6c8d969e97de196023ec7d23c56ac0da764fa