bugGNU Enscript - Bugs: bug #31844, line numbers are colored when...


bug #31844: line numbers are colored when previous line has a comment

Submitter:  Felix <flyx>
Submitted:  Fri 10 Dec 2010 11:10:32 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Mon 25 Nov 2013 05:39:16 PM UTC, comment #2: 

I concur that the issue is with eat_one_line ...
this change to c.st fixes the // comment

--- /usr/share/enscript/hl/c.st 2010-02-09 08:05:55.000000000 -0700
+++ .enscript/hl/c.st   2013-11-25 10:36:15.405568808 -0700
@@ -86,11 +86,11 @@
     call (c_comment);
     comment_face (false);
-  /\/\// {
+  /(\/\/.*)(\n)/ {
     comment_face (true);
-    language_print ($0);
-    call (eat_one_line);
+    language_print ($1);
     comment_face (false);
+    language_print ($2);

dave kerns <dtkerns>
Sat 13 Apr 2013 12:57:23 PM UTC, comment #1: 

Please see attached a rather hacky attempt at fixing this: just set the color back to grayscale for every line number (even if it's in a comment block, etc. that should remain highlighted; though I personally prefer no line numbers get highlighted).

This issue isn't only for comments, it happens for anything that uses eat_one_line.

(file #27859)

Ivan Lazar Miljenovic <ivan_l_m>
Fri 10 Dec 2010 11:10:32 AM UTC, original submission:  

If enscript is used with -C, --color and syntax highlighting, line numbers will have comment color if the preceding line ends with a comment. Tested with ada and tex highlighters on enscript 1.6.4.

example command:

enscript -Eada -C --color -o output.ps file.adb

Felix <flyx>


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

Attach Files:

Attached Files
file #27859:  enscript_dont_highlight_line_numbers.patch added by ivan_l_m (652B - text/x-patch - A hacky patch to un-color line numbers)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dtkerns (Posted a comment)
  • -email is unavailable- added by ivan_l_m (Updated the item)
  • -email is unavailable- added by flyx (Submitted 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.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-04-13 ivan_l_m Attached File- Added enscript_dont_highlight_line_numbers.patch, #27859

    Back to the top

    Powered by Savane 3.13-ee12.
    Corresponding source code