From 4aa58e16055fd24b7958c50397a27795105743e6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 12 Jan 2014 21:25:51 -0500 Subject: v5: heading recalibration, code (downstream) changes, continue --- lib/sisu/v5/xml_docbook5.rb | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'lib/sisu/v5/xml_docbook5.rb') diff --git a/lib/sisu/v5/xml_docbook5.rb b/lib/sisu/v5/xml_docbook5.rb index 0dddf264..be9ad802 100644 --- a/lib/sisu/v5/xml_docbook5.rb +++ b/lib/sisu/v5/xml_docbook5.rb @@ -136,20 +136,13 @@ module SiSU_XML_Docbook_Book end def docbook(lc,chlv='') case lc - when 0 - 'book' - when 1 - lc==chlv ? 'chapter' : 'section' - when 2 - lc==chlv ? 'chapter' : 'section' - when 3 - lc==chlv ? 'chapter' : 'section' - when 4 - 'section' - when 5 - 'section' - when 6 - 'section' + when 0 then 'book' + when 1 then lc==chlv ? 'chapter' : 'section' + when 2 then lc==chlv ? 'chapter' : 'section' + when 3 then lc==chlv ? 'chapter' : 'section' + when 4 then 'section' + when 5 then 'section' + when 6 then 'section' end end self @@ -181,7 +174,7 @@ module SiSU_XML_Docbook_Book put(tail) end def output(o,comment='') - puts o.lc == 0..6 \ + puts o.lc == (0..6) \ ? "#{space*o.lc}<#{o.lc}>[#{o.ocn}] #{o.ln} #{o.obj}#{comment}" : "<#{o.lc}>[#{o.ocn}] #{o.ln} #{o.obj}#{comment}" end -- cgit v1.2.3