Robot Framework lexer returns wrong indices if lines contain trailing spaces
While integrating Robot Framework lexer with wxStyledTextCtrl (wxPython widget that uses Scintilla) we noticed that it returns wrong indices if there are lines that contain trailing spaces.
The bug occurs because lines are rstripped (for no good reason) and the returned indices are calculated based on lengths of the returned values. After lines that contain trailing spaces indices are wrong.
Interestingly this bug doesn't seem to affect normal Pygments usage at all.
I'll create a pull request with the fix.