bugGNU nano - Bugs: bug #48561, improve Rust syntax highlighting

 
 

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

bug #48561: improve Rust syntax highlighting

Submitter:  Dirkjan Ochtman <djc>
Submitted:  Tue 19 Jul 2016 11:21:01 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Thu 21 Jul 2016 09:26:44 AM UTC, comment #2: 

Thanks.  Pushed to git, 1349c1d.

(In future please use git format-patch; the output of git log -p is not usable with git am.)

Benno Schulenberg <bens>
Group administrator
Wed 20 Jul 2016 06:12:32 PM UTC, comment #1: 

Thanks.  However, does Rust allow non-ASCII characters in variable names and identifiers?  For example, Smørrebrød or Ruža?  If yes, then "[A-Z][A-Za-z0-9]+" would not color Ruža, and would not color Smørrebrød when a Danish locale is set.  So, a better expression would be: "[[:upper:]][[:alnum:]]+".

If you agree, please attach a comitted and signed-off patch.

Benno Schulenberg <bens>
Group administrator
Tue 19 Jul 2016 11:21:01 AM UTC, original submission:  

Please incorporate this fix (I am the author):

diff --git a/doc/syntax/rust.nanorc b/doc/syntax/rust.nanorc
index c664ce0..0381de6 100644
--- a/doc/syntax/rust.nanorc
+++ b/doc/syntax/rust.nanorc
@@ -20,7 +20,7 @@ color red "[a-z_]+!"
 color magenta "[A-Z][A-Z_0-9]+"
 
 # Traits/Enums/Structs/Types/...
-color magenta "[A-Z][a-z0-9]+"
+color magenta "[A-Z][A-Za-z0-9]+"
 
 # Strings
 color green "\".*\""

Dirkjan Ochtman <djc>

 

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

Attached Files
file #37965:  nano-rust-syntax-capitals.patch added by djc (772B - application/octet-stream - Full patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by djc (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-30 bens Open/ClosedOpen Closed
    2016-07-21 bens StatusNone Fixed
        SummaryImprove Rust syntax highlighting improve Rust syntax highlighting
    2016-07-20 djc Attached File- Added nano-rust-syntax-capitals.patch, #37965
    2016-07-20 bens Severity3 - Normal 2 - Minor
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code