Skip to content

Commit

Permalink
tighten up regex
Browse files Browse the repository at this point in the history
  • Loading branch information
noprompt committed Mar 20, 2012
1 parent fcab024 commit dad6021
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vic/colorscheme/highlight.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(group, args={})
# #
# @param [String] hex a hexidecimal color # @param [String] hex a hexidecimal color
def fg=(color) def fg=(color)
if color =~ /none/i if color =~ /^none$/i
self.ctermfg = color self.ctermfg = color
elsif Color.is_hexadecimal?(color) elsif Color.is_hexadecimal?(color)
self.ctermfg = Color.hex_to_256(color) self.ctermfg = Color.hex_to_256(color)
Expand All @@ -57,7 +57,7 @@ def fg=(color)
# #
# @param [String] hex a hexidecimal color # @param [String] hex a hexidecimal color
def bg=(color) def bg=(color)
if color =~ /none/i if color =~ /^none$/i
self.ctermbg = color.upcase self.ctermbg = color.upcase
elsif Color.is_hexadecimal?(color) elsif Color.is_hexadecimal?(color)
self.ctermbg = Color.hex_to_256(color) self.ctermbg = Color.hex_to_256(color)
Expand Down

0 comments on commit dad6021

Please sign in to comment.