From c5a968e11aee9307bb9e381240d738b33c4775f1 Mon Sep 17 00:00:00 2001 From: Andrea Dejan Grande Date: Sun, 28 Apr 2019 03:57:23 +0200 Subject: [PATCH] Added cases --- jade.nanorc | 11 ++++++++--- pug.nanorc | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/jade.nanorc b/jade.nanorc index e372fbe..46725b5 100644 --- a/jade.nanorc +++ b/jade.nanorc @@ -7,8 +7,12 @@ color red "^\s*(html|head|body)" icolor magenta "^\s*(include)" # Variables color brightblue "^\s*(\-)\s(var)\s([a-z0-9]+)" -icolor magenta "^\s*(\-)\s(var)$" "^\s*(\-)\s(var)\s" -color white "^\s*(\-)" +icolor magenta "^\s*-\s(var)$" "^\s*-\s(var)\s" +# Cases +color brightblue "^\s*(case)\s(.*)" +color cyan "^\s*(when)\s(.*)" +icolor magenta "^\s*(case|when|default)$" "^\s*(case|when|default)\s" +color brightred "^\s*-\s(break)$" "^\s*-\s(break)\s" # Conditionals icolor magenta "^\s*(if|else|else if)$" "^\s*(if|else|else if)\s" # Parenthesis content @@ -17,9 +21,10 @@ color blue start="\(" end="\)" color cyan "('[^']*')|(\"[^\"]*\")" # Parenthesis, commas, equals icolor green "\(" "\)" "\," "\=" -# Comments and spaces +# Comments, dashes and spaces color blue "\s+(//.*)" color blue start="/\*" end="\*/" +color white "^\s*(\-)" color ,green "[[:space:]]+$" # Unbuffered comments color brightblue "\s+(//-.*)" diff --git a/pug.nanorc b/pug.nanorc index 16cda23..cb16507 100644 --- a/pug.nanorc +++ b/pug.nanorc @@ -7,8 +7,12 @@ color red "^\s*(html|head|body)" icolor magenta "^\s*(include)" # Variables color brightblue "^\s*(\-)\s(var)\s([a-z0-9]+)" -icolor magenta "^\s*(\-)\s(var)$" "^\s*(\-)\s(var)\s" -color white "^\s*(\-)" +icolor magenta "^\s*-\s(var)$" "^\s*-\s(var)\s" +# Cases +color brightblue "^\s*(case)\s(.*)" +color cyan "^\s*(when)\s(.*)" +icolor magenta "^\s*(case|when|default)$" "^\s*(case|when|default)\s" +color brightred "^\s*-\s(break)$" "^\s*-\s(break)\s" # Conditionals icolor magenta "^\s*(if|else|else if)$" "^\s*(if|else|else if)\s" # Parenthesis content @@ -17,9 +21,10 @@ color blue start="\(" end="\)" color cyan "('[^']*')|(\"[^\"]*\")" # Parenthesis, commas, equals icolor green "\(" "\)" "\," "\=" -# Comments and spaces +# Comments, dashes and spaces color blue "\s+(//.*)" color blue start="/\*" end="\*/" +color white "^\s*(\-)" color ,green "[[:space:]]+$" # Unbuffered comments color brightblue "\s+(//-.*)"