bugGNU source-highlight - Bugs: bug #45299, Hang while highlighting ZSH source

 
 

bug #45299: Hang while highlighting ZSH source

Submitter:  None
Submitted:  Wed 10 Jun 2015 10:13:19 PM UTC
Votes: 6
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 02 Jun 2019 02:50:13 PM UTC, comment #6: 

Fixed.

Tom Tromey <tromey>
Group administrator
Tue 22 Aug 2017 04:47:33 PM UTC, comment #5: 

The problem is in zsh.lang.  The keyword clause ends with a trailing vertical bar.  If you remove that, zsh source highlighting will work.  I checked the git repo, and the bug is still there (https://git.savannah.gnu.org/cgit/src-highlite.git/tree/src/zsh.lang).

Anonymous
Mon 17 Jul 2017 03:28:18 AM UTC, comment #4: 

It seems to work with source-highlight 3.1.7 but 3.1.8 hangs.

Example:

```file.sh
#!/usr/bin/env zsh
echo "Hello world!"
```

Using `source-highlight --failsafe --infer-lang -f esc --style-file=esc.style -i file.sh`, 3.1.7 can highlight well but 3.1.8 hangs.

kakakaya <kakakaya>
Sun 11 Dec 2016 08:42:59 PM UTC, comment #3: 

I'm also affected by this, following...

Chris <turbochris>
Sun 16 Oct 2016 11:00:38 PM UTC, comment #2: 

I noticed this issue as well, I tested `zsh.lang` and compared it to `sh.lang`, If you make them identical it runs perfect. I'm working now on a patch for zsh.lang and I'll post a link here to it.

-X- <doron_behar>
Tue 23 Jun 2015 07:56:19 AM UTC, comment #1: 

Having the same issue. That seems like a regression.

Anonymous
Wed 10 Jun 2015 10:13:19 PM UTC, original submission:  

When using the “zsh” language definition source-highlight hangs indefinitely.

—————————————————————————
% source-highlight --verbose --lang-def zsh.lang test.zsh
retrieving default datadir value...
using hardcoded datadir value /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight
opening ./outlang.map
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/outlang.map
Processing test.zsh ... opening ./html.outlang
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/html.outlang
opening ./html_common.outlang
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/html_common.outlang
opening ./html_ref.outlang
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/html_ref.outlang
opening ./default.style
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/default.style
opening ./style.defaults
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/style.defaults
opening ./zsh.lang
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/zsh.lang
opening ./number.lang
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/number.lang
opening ./script_comment.lang
opening /usr/local/Cellar/source-highlight/3.1.8/share/source-highlight/script_comment.lang
^C
—————————————————————————

The test file is attached.  (It's just "echo test").

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44305:  fix-zsh-highlighting-hangups.patch added by barraponto (504B - text/x-patch - Implements fix from comment #5, working in 3.1.8)
file #34198:  test.zsh added by None (11B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tromey (Posted a comment)
  • -email is unavailable- added by barraponto (Updated the item)
  • -email is unavailable- added by doronbehar
  • -email is unavailable- added by kakakaya (Posted a comment)
  • -email is unavailable- added by turbochris (Posted a comment)
  • -email is unavailable- added by turbochris (Voted in favor of this item)
  • -email is unavailable- added by doron_behar (Posted a comment)
  • -email is unavailable- added by lexinator (Voted in favor of this item)
  •  

    There are 6 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
    2019-06-02 tromey Open/ClosedOpen Closed
    2018-06-05 barraponto Attached File- Added fix-zsh-highlighting-hangups.patch, #44305
    2017-08-07 doronbehar Carbon-Copy- Added -email is unavailable-
    2016-12-11 turbochris Carbon-Copy- Added turbochris
    2015-10-26 lexinator Carbon-Copy- Added lexinator
    2015-06-10 None Attached File- Added test.zsh, #34198

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code