Skip to content

Commit

Permalink
Fix escape_enabled? predicate method (#1174)
Browse files Browse the repository at this point in the history
The `escape_enabled?` predicate method should check that the
`@escape_enabled` instance variable has been set.
  • Loading branch information
mojavelinux authored and pyrmont committed Jun 13, 2019
1 parent 0e9ed56 commit de91c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def self.with_escape
end

def self.escape_enabled?
!!(@escape_enabled || Thread.current[:'rouge/with-escape'])
!!(((defined? @escape_enabled) && @escape_enabled) || Thread.current[:'rouge/with-escape'])
end

def self.enable_escape!
Expand Down

0 comments on commit de91c27

Please sign in to comment.