I want to modify the solution for highlighting trailing whitespace described here by NOT highlighting whitespace on otherwise empty lines.
I've modified this in my Python language file:
{ match = '(\s+)$';
captures = { 1 = { name = 'invalid.whitespace'; }; };
},
To this:
{ match = '\S(\s+)$';
captures = { 1 = { name = 'invalid.whitespace'; }; };
},
This new expression doesn't seem to match anything anymore. What am I doing wrong ?