From 4f5b055e9eb95cc4078cc776398d8239fe65c8ba Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 19 Jun 2014 19:38:14 -0400 Subject: v6: docbook, tags (name touch) --- lib/sisu/v6/xml_docbook5.rb | 60 ++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v6/xml_docbook5.rb b/lib/sisu/v6/xml_docbook5.rb index bc4ad233..a835288a 100644 --- a/lib/sisu/v6/xml_docbook5.rb +++ b/lib/sisu/v6/xml_docbook5.rb @@ -135,7 +135,7 @@ module SiSU_XML_Docbook_Book def collapsed %w[ 0 1 2 3 4 5 ] end - def docbook(lc,chlv='') + def docbook_tag(lc,chlv='') case lc when 0 then 'book' when 1 then lc==chlv ? 'chapter' : 'section' @@ -217,7 +217,7 @@ module SiSU_XML_Docbook_Book doc_position=:body_and_tail else filename_docbook.puts structure_build_tag_close(o.lc,h) - filename_docbook.puts %{#{spaces*(o.lc)}<#{tags.docbook(o.lc,chlv)}#{tag_id}> + filename_docbook.puts %{#{spaces*(o.lc)}<#{tags.docbook_tag(o.lc,chlv)}#{tag_id}> #{spaces*o.lc} } end @@ -237,40 +237,40 @@ module SiSU_XML_Docbook_Book x=[] case h when 0 - x << "#{spaces*0}" if (lc <= 0) + x << "#{spaces*0}" if (lc <= 0) when 1 - x << "#{spaces*1}" if (lc <= 1) - x << "#{spaces*0}" if (lc <= 0) + x << "#{spaces*1}" if (lc <= 1) + x << "#{spaces*0}" if (lc <= 0) when 2 - x << "#{spaces*2}" if (lc <= 2) - x << "#{spaces*1}" if (lc <= 1) - x << "#{spaces*0}" if (lc <= 0) + x << "#{spaces*2}" if (lc <= 2) + x << "#{spaces*1}" if (lc <= 1) + x << "#{spaces*0}" if (lc <= 0) when 3 - x << "#{spaces*3}" if (lc <= 3) - x << "#{spaces*2}" if (lc <= 2) - x << "#{spaces*1}" if (lc <= 1) - x << "#{spaces*0}" if (lc <= 0) + x << "#{spaces*3}" if (lc <= 3) + x << "#{spaces*2}" if (lc <= 2) + x << "#{spaces*1}" if (lc <= 1) + x << "#{spaces*0}" if (lc <= 0) when 4 - x << "#{spaces*4}" if (lc <= 4) - x << "#{spaces*3}" if (lc <= 3) - x << "#{spaces*2}" if (lc <= 2) - x << "#{spaces*1}" if (lc <= 1) - x << "#{spaces*0}" if (lc <= 0) + x << "#{spaces*4}" if (lc <= 4) + x << "#{spaces*3}" if (lc <= 3) + x << "#{spaces*2}" if (lc <= 2) + x << "#{spaces*1}" if (lc <= 1) + x << "#{spaces*0}" if (lc <= 0) when 5 - x << "#{spaces*5}" if (lc <= 5) - x << "#{spaces*4}" if (lc <= 4) - x << "#{spaces*5}" if (lc <= 3) - x << "#{spaces*2}" if (lc <= 2) - x << "#{spaces*1}" if (lc <= 1) - x << "#{spaces*0}" if (lc <= 0) + x << "#{spaces*5}" if (lc <= 5) + x << "#{spaces*4}" if (lc <= 4) + x << "#{spaces*5}" if (lc <= 3) + x << "#{spaces*2}" if (lc <= 2) + x << "#{spaces*1}" if (lc <= 1) + x << "#{spaces*0}" if (lc <= 0) when 6 - x << "#{spaces*6}" if (lc <= 6) - x << "#{spaces*5}" if (lc <= 5) - x << "#{spaces*4}" if (lc <= 4) - x << "#{spaces*3}" if (lc <= 3) - x << "#{spaces*2}" if (lc <= 2) - x << "#{spaces*1}" if (lc <= 1) - x << "#{spaces*0}" if (lc <= 0) + x << "#{spaces*6}" if (lc <= 6) + x << "#{spaces*5}" if (lc <= 5) + x << "#{spaces*4}" if (lc <= 4) + x << "#{spaces*3}" if (lc <= 3) + x << "#{spaces*2}" if (lc <= 2) + x << "#{spaces*1}" if (lc <= 1) + x << "#{spaces*0}" if (lc <= 0) end x.join("\n") end -- cgit v1.2.3