Skip to content

Commit

Permalink
Merge pull request #980 from alexharv074/alexharvey/fix_puppet_equals
Browse files Browse the repository at this point in the history
Add = as Operator in Puppet lexer
  • Loading branch information
dblessing authored Sep 14, 2018
2 parents 27a4bfb + e1ad61a commit 7c598c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/puppet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def self.metaparameters
rule /(in|and|or)\b/, Operator::Word
rule /[=!<>]=/, Operator
rule /[=!]~/, Operator, :regex_allowed
rule %r([<>!+*/-]), Operator
rule %r([=<>!+*/-]), Operator

rule /(class|include)(\s*)(#{qualname})/ do
groups Keyword, Text, Name::Class
Expand Down
9 changes: 9 additions & 0 deletions spec/visual/samples/puppet
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ node /www\.example\.com/ {
}
}
}

class foo::bar (
Array[String] = foo::bar::baz,
) {
$foo = [
'bar',
'baz',
]
}

0 comments on commit 7c598c0

Please sign in to comment.