From 084f47074b77486cb9086254d8ec04d100a39b81 Mon Sep 17 00:00:00 2001 From: cn Date: Thu, 26 Jul 2012 17:57:42 +0200 Subject: [PATCH] Puppet: highlight multiline comments properly --- puppet.jsf | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/puppet.jsf b/puppet.jsf index f012c85..337a642 100644 --- a/puppet.jsf +++ b/puppet.jsf @@ -16,24 +16,38 @@ :idle Idle * idle "\n" idle - "#" comment recolor=-1 + "#" line_comment recolor=-1 "{[]}" brace recolor=-1 "0" first_digit recolor=-1 "1-9" decimal recolor=-1 "\"" string recolor=-1 "'" char recolor=-1 - "/" regex recolor=-1 + "/" slash "$" variable recolor=-1 "A-Z" type recolor=-1 "a-z" ident buffer -:comment Comment +:line_comment Comment * comment "\n" idle +:comment Comment + * comment + "*" maybe_end_comment + +:maybe_end_comment Comment + * comment noeat + "/" idle + "*" maybe_end_comment + :brace Brace * idle noeat +# that's not completely accurate since a regex may start with a * too +:slash Idle + * regex noeat recolor=-2 + "*" comment recolor=-2 + :first_digit Constant * idle noeat "0-7" octal