Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Commit

Permalink
Fix YARD error when parsing LiveScript lexer (rouge-ruby#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 and mattt committed May 19, 2021
1 parent 8f05456 commit 9fa43d8
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 9fa43d8

Please sign in to comment.