lib/mustermann/visualizer/highlight.rb in mustermann-contrib-1.0.3 vs lib/mustermann/visualizer/highlight.rb in mustermann-contrib-1.1.0

- old
+ new

@@ -14,23 +14,23 @@ class Highlight # @!visibility private attr_reader :pattern, :theme # @!visibility private - DEFAULT_THEME = Hansi::Theme.new(:solarized, { + DEFAULT_THEME = Hansi::Theme.new(:solarized, default: :base0, separator: :base1, escaped: :base1, capture: :orange, name: :yellow, special: :blue, quote: :red, illegal: :darkred - }) + ) # @!visibility private - BASE_THEME = Hansi::Theme.new({ + BASE_THEME = Hansi::Theme.new( special: :default, capture: :special, char: :default, expression: :capture, composition: :special, @@ -44,16 +44,16 @@ variable: :capture, escaped: :char, quote: :special, type: :special, illegal: :special - }) + ) # @!visibility private def initialize(pattern, type: nil, inspect: nil, **theme) @pattern = Mustermann.new(pattern, type: type) @inspect = inspect.nil? ? pattern.is_a?(Mustermann::Composite) : inspect - theme = theme.any? ? Hansi::Theme.new(theme) : DEFAULT_THEME + theme = theme.any? ? Hansi::Theme.new(**theme) : DEFAULT_THEME @theme = BASE_THEME.merge(theme) end # @example # require 'mustermann/visualizer'