Skip to content

Commit

Permalink
Merge pull request scopatz#329 from DanteFalzone0/master
Browse files Browse the repository at this point in the history
Fixed higlighting of inline comments in several languages
  • Loading branch information
scopatz authored Aug 27, 2020
2 parents dcad108 + 09d9216 commit b20013a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions c.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" "\.ino"
magic "^(C|C\+\+) (source|program)"
comment "//"
color brightred "\<[A-Z_][0-9A-Z_]+\>"
color brightred "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|bool|char|wchar_t|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
color green "\<((s?size)|(char(16|32))|((u_?)?int(_fast|_least)?(8|16|32|64))|u?int(max|ptr))_t\>"
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
Expand All @@ -21,7 +21,7 @@ color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\
color green "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"

#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"

#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
Expand All @@ -37,7 +37,7 @@ color cyan "<[^= ]*>" ""(\\.|[^"])*""
#color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""

## Comment highlighting
color brightblue "^\s*//.*"
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

# Highlighting for documentation comments
Expand Down
2 changes: 1 addition & 1 deletion java.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interfa
color red ""[^"]*""
color yellow "\<(true|false|null)\>"
icolor yellow "\b(([1-9][0-9]+)|0+)\.[0-9]+\b" "\b[1-9][0-9]*\b" "\b0[0-7]*\b" "\b0x[1-9a-f][0-9a-f]*\b"
color blue "^\s*//.*"
color blue "//.*"
color blue start="^\s*/\*" end="\*/"
color brightblue start="/\*\*" end="\*/"

Expand Down
2 changes: 1 addition & 1 deletion javascript.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ color green "\<(Number|Object|RegExp|String)\>"
color red "[-+/*=<>!~%?:&|]"
color magenta "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color magenta "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color brightblack "(^|[[:space:]])//.*"
color brightblack "//.*"
color brightblack "/\*.+\*/"
color brightwhite,cyan "TODO:?"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'|(`|\})(\\.|[^`$]|$[^{])*(\$\{|`)"
Expand Down

0 comments on commit b20013a

Please sign in to comment.