Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
Add a comment to explain the /\=/ syntax, otherwise extremely confusing.
  • Loading branch information
alex-harvey-z3q committed Sep 4, 2018
1 parent 741cc15 commit 93893e2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/rouge/lexers/puppet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ def self.metaparameters
rule /{/, Punctuation, :regex_allowed
rule /,/, Punctuation, :regex_allowed

rule /(in|and|or)\b/, Operator::Word
# Handle the = operator.

# The backslash is required here to prevent Ruby from
# interpreting /= as the divide-and-assign operator!
#
rule /\=/, Operator

rule /(in|and|or)\b/, Operator::Word
rule /[=!<>]=/, Operator
rule /[=!]~/, Operator, :regex_allowed
rule %r([<>!+*/-]), Operator
Expand Down

0 comments on commit 93893e2

Please sign in to comment.