For line comments '#...', when using Windows \r\n line ends, the Perl lexer styles the \r as comment and the \n as default. With Unix \n line ends the \n is in the default style.
This confuses the automatic lexer tests as there is a transition inside the line end. It can also cause visual differences.

There are a couple of possible changes here - show both the line end characters as default or as comments. Since Unix-formatted files have all line ends currently styled as default, styling the \r as default seems the less destabilising. This can be achieved with a simple patch:
break;
case SCE_PL_COMMENTLINE:
- if (sc.atLineEnd) {
+ if (sc.atLineEnd || (sc.ch == '\r')) {
sc.SetState(SCE_PL_DEFAULT);
}
Tested with version 4.3.2.
Another simple patch, witch matches behaviors for many other lexers.
Changed to changing style to default at line start so that all line end characters of comment lines are in comment line style with [3f7f9e].
Related
Commit: [3f7f9e]
Changed to changing style to default at line start so that all line end characters of comment lines are in comment line style with [3f7f9e].
Related
Commit: [3f7f9e]