aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/options.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-02-04 00:11:52 -0500
committerRalph Amissah <ralph@amissah.com>2013-02-04 00:11:52 -0500
commitb509e362a21e86e95cc46ff582db1f8e2bc14319 (patch)
tree7911fb8f6a2b4784f70ad7dd90f2744e0dbeed31 /lib/sisu/v4/options.rb
parentdebian/changelog (4.0.4-1) (diff)
parentv4: documentation, include --html-scroll and --html-seg options (diff)
Merge tag 'sisu_4.0.5' into debian/sid
Diffstat (limited to 'lib/sisu/v4/options.rb')
-rw-r--r--lib/sisu/v4/options.rb24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb
index e26fcfc2..fbdfc8f3 100644
--- a/lib/sisu/v4/options.rb
+++ b/lib/sisu/v4/options.rb
@@ -471,6 +471,8 @@ module SiSU_Commandline
when /^--(?:dal?|machine|abstraction|abs)$/; c=c+'m'
when /^--(?:txt|text|plaintext)$/; c=c+'t'
when /^--(?:html)$/; c=c+'h'
+ when /^--(?:html-scroll|html-seg)$/; c=c+'H'
+ mod << m
when /^--(?:epub)$/; c=c+'e'
when /^--(?:od[ft])$/; c=c+'o'
when /^--(?:pdf)$/; c=c+'p'
@@ -757,10 +759,24 @@ module SiSU_Commandline
|| mod.inspect =~/"--dal"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
- act[:html]=(cmd =~/h/ \
- || mod.inspect =~/"--html"/) \
- ? { bool: true, set: :on }
- : { bool: false, set: :na }
+ act[:html]=if (cmd =~/h/ \
+ || mod.inspect =~/"--html"/)
+ act[:html_scroll]={ bool: true, set: :on }
+ act[:html_seg]={ bool: true, set: :on }
+ { bool: true, set: :on }
+ else
+ act[:html_scroll]=if mod.inspect =~/"--html-scroll"/
+ { bool: true, set: :on }
+ else
+ { bool: false, set: :na }
+ end
+ act[:html_seg]=if mod.inspect =~/"--html-seg"/
+ { bool: true, set: :on }
+ else
+ { bool: false, set: :na }
+ end
+ { bool: false, set: :na }
+ end
act[:concordance]=(cmd =~/w/ \
|| mod.inspect =~/"--concordance"/) \
? { bool: true, set: :on }