mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-11-05 04:08:10 +08:00
Fix color check
This commit is contained in:
@@ -60,7 +60,7 @@ module Uplot
|
|||||||
params.padding = v
|
params.padding = v
|
||||||
end
|
end
|
||||||
opt.on('-c', '--color VAL', 'color of the drawing', String) do |v|
|
opt.on('-c', '--color VAL', 'color of the drawing', String) do |v|
|
||||||
params.color = v =~ /\<[0-9]+\>/ ? v.to_i : v.to_sym
|
params.color = v =~ /\A[0-9]+\z/ ? v.to_i : v.to_sym
|
||||||
end
|
end
|
||||||
opt.on('--[no-]labels', 'hide the labels', TrueClass) do |v|
|
opt.on('--[no-]labels', 'hide the labels', TrueClass) do |v|
|
||||||
params.labels = v
|
params.labels = v
|
||||||
|
|||||||
Reference in New Issue
Block a user