diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-05-25 10:06:59 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-05-25 10:06:59 -0400 |
commit | dcb004beebc9551e19e8380702aaa7c38224d787 (patch) | |
tree | 786d575295c7f7a1536ba9ba954043d475fd8a49 /lib/sisu/v5/xml_fictionbook2.rb | |
parent | debian/changelog (5.3.6-1) (diff) | |
parent | v5: merge v6 to v5, version bump to 5.4.*, reason adds structure check (diff) |
Merge tag 'sisu_5.4.0' into debian/sid
SiSU 5.4.0
Diffstat (limited to 'lib/sisu/v5/xml_fictionbook2.rb')
-rw-r--r-- | lib/sisu/v5/xml_fictionbook2.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sisu/v5/xml_fictionbook2.rb b/lib/sisu/v5/xml_fictionbook2.rb index c72332bb..32a7bc76 100644 --- a/lib/sisu/v5/xml_fictionbook2.rb +++ b/lib/sisu/v5/xml_fictionbook2.rb @@ -277,7 +277,7 @@ module SiSU_XML_Fictionbook WOK 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 @@ -304,7 +304,12 @@ module SiSU_XML_Fictionbook doc_position=:head filename_fictionbook.puts head data.each_with_index do |o,i| - ocn=(defined? o.ocn and not o.ocn.nil?) ? "\n#{Dx[:ocn_o]}#{o.ocn}#{Dx[:ocn_c]}" : '' + ocn=if @make.build.ocn? + (defined? o.ocn and not o.ocn.nil?) \ + ? "\n#{Dx[:ocn_o]}#{o.ocn}#{Dx[:ocn_c]}" + : '' + else '' + end if o.is ==:heading unless doc_position==:head filename_fictionbook.puts structure_build_tag_close(o.lc,h) |