Skip to content

Commit

Permalink
Fix RuboCop grouped expression warning in Python lexer (#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
#1508 pull request results in a RuboCop warning concerning parentheses
and grouped expressions. This commit fixes that warning.
  • Loading branch information
pyrmont committed May 12, 2020
1 parent 9f1f582 commit 1e32f3c
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 1e32f3c

Please sign in to comment.