File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -498,6 +498,10 @@ def parse(*opts)
498
498
if opts . first . kind_of? ( String )
499
499
a << OptArg . quote ( opts . shift )
500
500
end
501
+ when NEED_QUOTE_TIME
502
+ if opts . first . kind_of? ( String )
503
+ a << OptArg . quote_time ( opts . shift )
504
+ end
501
505
when NEED_QUOTE
502
506
if opts . first . kind_of? ( String )
503
507
a << OptArg . quote ( opts . shift )
@@ -516,6 +520,12 @@ def parse(*opts)
516
520
a . join ( sep )
517
521
end
518
522
523
+ NEED_QUOTE_TIME = /^timef(mt?)?/
524
+
525
+ def quote_time ( s )
526
+ "\" \\ \" #{ s } \\ \" \" "
527
+ end
528
+
519
529
NEED_QUOTE = %w[
520
530
background
521
531
cblabel
@@ -613,6 +623,8 @@ def parse_kv(s,v)
613
623
else
614
624
"#{ k } #{ parse ( v ) } "
615
625
end
626
+ when NEED_QUOTE_TIME
627
+ "#{ k } #{ OptArg . quote_time ( v ) } "
616
628
when NEED_QUOTE
617
629
case v
618
630
when String
You can’t perform that action at this time.
0 commit comments