Skip to content

Commit

Permalink
Fix YARD error when parsing LiveScript lexer (#1541)
Browse files Browse the repository at this point in the history
A single line if-statement in the LiveScript lexer causes an error when
YARD runs over the project. Replacing it with a ternary statement fixes
the problem.
  • Loading branch information
pyrmont authored Jun 19, 2020
1 parent 2e21536 commit 29ad1ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/livescript.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def self.loop_control_keywords
rule %r/[#][{]/, Str::Interpol, :interpolated_expression
# without curly braces
rule %r/(#)(#{id})/ do |m|
groups Str::Interpol, if self.class.builtins.include? m[2] then Name::Builtin else Name::Variable end
groups Str::Interpol, (self.class.builtins.include? m[2]) ? Name::Builtin : Name::Variable
end
end

Expand Down

0 comments on commit 29ad1ba

Please sign in to comment.