bugGNU source-highlight - Bugs: bug #36613, Bash highlighting using...

 
 

bug #36613: Bash highlighting using --lang-def=sh.lang

Submitter:  None
Submitted:  Sat 09 Jun 2012 04:42:19 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  bettini
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 09 Nov 2012 03:06:03 PM UTC, comment #1: 

I think the problem is not the final ' but the fact that $' is interpeted as a variable and thus the first ' is not consumed as a string.

I fixed this in the git head, but I also attach the fixed sh.lang.



(file #26901)

Lorenzo Bettini <bettini>
Group administrator
Sat 09 Jun 2012 04:42:19 PM UTC, original submission:  

When the script or function contains a line that ends in a single quote, the following lines are incorrectly coded as though they were part of a single quoted string.

The terminating single quote looks like it is being misinterpreted as the start of a single quoted string.

I find this when I have a statement like:

IFS=$'\t'

Thereafter, everything is coded red.

See the attached test script and the html output.

bill at ycc.com

Bill Gradwohl

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #26901:  sh.lang added by bettini (1KiB - application/octet-stream)
file #26000:  problem added by None (225B - application/octet-stream)
file #26001:  problem.html added by None (1KiB - text/html)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bettini (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-11-09 bettini Open/ClosedOpen Closed
    2012-11-09 bettini Attached File- Added sh.lang, #26901
        StatusNone Fixed
        Assigned toNone bettini
    2012-06-09 None Attached File- Added problem, #26000
        Attached File- Added problem.html, #26001

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code