diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-01-12 21:30:22 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-01-12 21:30:22 -0500 |
commit | 3ca7ba8c0fdfd9ad9681012f1816b8ec534e8083 (patch) | |
tree | f1efb49ba113fea43cd39b71698b66f43cdb0531 /lib/sisu/v5/xml_docbook5.rb | |
parent | debian/changelog (4.2.17-1) (diff) | |
parent | v5: asciidoc, file extension (for now .ad), inline footnotes, minor (diff) |
Merge tag 'sisu_4.2.18' into debian/sid
SiSU 4.2.18
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 |