patchGNU nano - Patches: patch #9865, improve syntax highlighting for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9865: improve syntax highlighting for Javascript and HTML

Submitter:  Ryan Westlund <yujiri>
Submitted:  Tue 22 Oct 2019 12:20:29 PM UTC
   
 
Priority:  3 - Low Status:  Done
Privacy:  Public Assigned to:  bens
Open/Closed:  Closed Release:  None

Jump to the original submission

Thu 12 Dec 2019 10:05:50 AM UTC, comment #6: 

Released in nano-4.6.

Benno Schulenberg <bens>
Group administrator
Sun 03 Nov 2019 05:55:02 PM UTC, comment #5: 

Added in commit 75dd9bee.

Benno Schulenberg <bens>
Group administrator
Sun 03 Nov 2019 03:24:40 PM UTC, comment #4: 

I didn't know if I should open a separate issue for this but I just realized I forgot true and false! I'll attach the diff.

(file #47788)

Ryan Westlund <yujiri>
Thu 24 Oct 2019 03:21:55 PM UTC, comment #3: 

Okay -- I've used the Original-patch-by marker.

Applied and pushed to master, commits aae75291 and 40f8ca0d.  Thanks for the improvements.

Benno Schulenberg <bens>
Group administrator
Wed 23 Oct 2019 12:11:19 PM UTC, comment #2: 

I don't know much about the difference, but put whichever you think is appropriate.

Ryan Westlund <yujiri>
Wed 23 Oct 2019 08:18:11 AM UTC, comment #1: 

Thanks for the patch.  I've separated it into two patches.  Do you want to put a Signed-of-by on those patches?  Or shall I apply them with an Original-patch-by tag?

(file #47730, file #47731)

Benno Schulenberg <bens>
Group administrator
Tue 22 Oct 2019 12:20:29 PM UTC, original submission:  

I have one improvement for JS and two for HTML.

Javascript: add color for `null` and `undefined`. I chose cyan for them to match the number literals since they're also primitive, literal values.

HTML: fix issues where attribute names would get colored inside of attribute values or as part of another attribute. For example, on my site I use the line

`<meta name="viewport" content="width=device-width, initial-scale=1">`

And it colors `width=` as red. Similarly, in `<divid=>`, `id=` is colored red.

For HTML, I moved the string coloring rule to after the attributes, so attribute values will always be all green; and also changed the attribute rules to only match at the start of a word with `\<`.

Ryan Westlund <yujiri>

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Updated the item)
  • -email is unavailable- added by yujiri (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.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-12 bens Open/ClosedOpen Closed
    2019-11-03 yujiri Attached File- Added true_false.patch, #47788
    2019-10-24 bens StatusIn Progress Done
        SummaryImprove syntax highlighting for JS and HTML improve syntax highlighting for Javascript and HTML
    2019-10-23 bens Attached File- Added 0001-syntax-javascript-colorize-also-special-values-null-.patch, #47730
        Attached File- Added 0002-syntax-html-colorize-only-full-attributes-and-colori.patch, #47731
        StatusNone In Progress
        Assigned toNone bens
    2019-10-22 yujiri Attached File- Added syntax-highlighting-js-html.patch, #47729

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code