Skip to content

Commit

Permalink
Add SuperDiff::Configuration#color_enabled= (#138)
Browse files Browse the repository at this point in the history
Currently, you need to use merge!(), which doesn't look pretty.
  • Loading branch information
knu authored Feb 10, 2023
1 parent 124fbe9 commit 991b1b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ end
See [eight_bit_color.rb](lib/super_diff/csi/eight_bit_color.rb)
for the list of available colors.

You can also completely disable colorized output.

``` ruby
SuperDiff.configure do |config|
config.color_enabled = false
end
```

### Disabling the key

You can disable the key by changing the following config (default: true):
Expand Down
1 change: 1 addition & 0 deletions lib/super_diff/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Configuration
attr_accessor(
:actual_color,
:border_color,
:color_enabled,
:diff_elision_enabled,
:diff_elision_maximum,
:elision_marker_color,
Expand Down

0 comments on commit 991b1b6

Please sign in to comment.