#1572 Python lexer: Expose escaped characters

Ram Rachum

It would be really awesome if the Python lexer could show, inside Python strings, any escape sequences.

For example, in this string:

'H\\ello\t folks!\r\n'

The \, \t, \r, and \n will have a different color.

Is this possible? It would make working with Python strings easier.

Also keep in mind that the lexer will need to look at whether the string is raw, i.e. prefixed by r, in which case there's no escaping (I think).


  • Neil Hodgson

    Neil Hodgson - 2014-01-21

    I would not want this to be the default behaviour since escapes are a relatively uninteresting part of string syntax. If you want to implement this it should be an option and default to off.

  • Neil Hodgson

    Neil Hodgson - 2014-01-21
    • labels: --> scintilla, lexer, python
    • assigned_to: Neil Hodgson
    • Priority: 5 --> 3

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks