diff options
Diffstat (limited to 'lib/sisu/v5/xml_docbook5.rb')
-rw-r--r-- | lib/sisu/v5/xml_docbook5.rb | 23 |
1 files changed, 8 insertions, 15 deletions
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}</#{o.lc}>#{comment}" : "<#{o.lc}>[#{o.ocn}] #{o.ln} #{o.obj}</#{o.lc}>#{comment}" end |