#2819 Shell Script colour syntax highlighting not correct for \"

normal bug
closed-accepted
5
2007-03-02
2007-02-20
Geoff
No

If you have \" in a text string in a Unix Shell Script file (.sh) then the colour highlighting gets confused.

This example works fine in jEdit 4.2 but is a bug introduced by jEdit 4.3 Pre 9, where the problem does exist.

To reproduce this problem do the following, the test in jEdit 4.2 is optional:

- load jEdit 4.2
- save the new file as test.sh
- type the following lines of shell script
variable1="this is some text"
variable2="text with a \" in it"
variable3="and more text"
- save the changes to the file
- observe that the variable names before the = sign are green, the equals sign is black and the double quote characters and the text between them are purple
- now load the file up in jEdit Pre 9
- observe that the \" on the second lines acts like a string terminator and the highlighting goes wrong from here on

This problem does make editing shell script files quite confusing as the whole file from \" onwards is impacted.

Discussion

  • Geoff

    Geoff - 2007-02-20

    Logged In: YES
    user_id=869700
    Originator: YES

    File Added: jEdit_bug.sh

     
  • Matthieu Casanova

    • assigned_to: nobody --> kpouer
    • status: open --> closed-fixed
     
  • Matthieu Casanova

    Logged In: YES
    user_id=285591
    Originator: NO

    Hi, it is fixed in SVN, try this mode
    http://jedit.svn.sourceforge.net/viewvc/\*checkout*/jedit/jEdit/trunk/modes/shellscript.xml?revision=8822

     
  • Geoff

    Geoff - 2007-03-02
    • status: closed-fixed --> closed-accepted
     
  • Geoff

    Geoff - 2007-03-02

    Logged In: YES
    user_id=869700
    Originator: YES

    Excellent, that works very nicely now. Thank you very much.

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks