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

Commit

Permalink
Fix RuboCop grouped expression warning in Python lexer (rouge-ruby#1513)
Browse files Browse the repository at this point in the history
The use of a ternary in code added to the Python lexer as part of the
rouge-ruby#1508 pull request results in a RuboCop warning concerning parentheses
and grouped expressions. This commit fixes that warning.
  • Loading branch information
pyrmont authored and mattt committed May 21, 2020
1 parent 5c5a53a commit 0a1ab57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/python.rb
Expand Up @@ -210,7 +210,7 @@ def current_string
| [0-7]{1,3}
)
)x do
token (current_string.type?("r") ? Str : Str::Escape)
current_string.type?("r") ? token(Str) : token(Str::Escape)
pop!
end

Expand Down

0 comments on commit 0a1ab57

Please sign in to comment.