#2792 Python mode mishandles string literals

closed-duplicate
nobody
5
2007-01-25
2007-01-24
bobalex
No

And I think I have a fix.

The problem is that escaped delimiter characters are not recognized as escaped.

"xxx\"yyy" zzz

highlights just "xxx\", lowlights yyy, and highlights all else to the right!

Same for single-quoted literals:

'xxx\'yyy' zzz

Modifying line 351 of the modes/python.xml file seems to fix it:

<RULES SET="LITERAL_ONE" DEFAULT="LITERAL1" ESCAPE="\">

=>

<RULES SET="LITERAL_ONE" DEFAULT="LITERAL1">

Bob

Discussion

  • daniel hahler
    daniel hahler
    2007-01-25

    Logged In: YES
    user_id=663176
    Originator: NO

    Duplicate of 1630805 - seems to be the same bug.

     
  • daniel hahler
    daniel hahler
    2007-01-25

    • milestone: --> Regressive (new to devel)
    • status: open --> open-duplicate
     
  • daniel hahler
    daniel hahler
    2007-01-25

    • status: open-duplicate --> closed-duplicate