Skip to content
Browse files

tighten up regex

  • Loading branch information...
1 parent fcab024 commit dad60219f5d137553ebcecaa672b21a3a4f2f4c3 @noprompt committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/vic/colorscheme/highlight.rb
View
4 lib/vic/colorscheme/highlight.rb
@@ -42,7 +42,7 @@ def initialize(group, args={})
#
# @param [String] hex a hexidecimal color
def fg=(color)
- if color =~ /none/i
+ if color =~ /^none$/i
self.ctermfg = color
elsif Color.is_hexadecimal?(color)
self.ctermfg = Color.hex_to_256(color)
@@ -57,7 +57,7 @@ def fg=(color)
#
# @param [String] hex a hexidecimal color
def bg=(color)
- if color =~ /none/i
+ if color =~ /^none$/i
self.ctermbg = color.upcase
elsif Color.is_hexadecimal?(color)
self.ctermbg = Color.hex_to_256(color)

0 comments on commit dad6021

Please sign in to comment.
Something went wrong with that request. Please try again.