Ah, sorry, I really only relied on the test suite. But I'm glad that at least the problem is clear now.

I guess one way to fix this the right way is to split on `/\r?\n` as you suggested, but store the actual linebreak characters as meta information per line. Then the line endings rule could simply work with that meta information.

Do you see an easier way to fix it? Otherwise I can try to provide a better patch.