aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/xml_fictionbook2.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/xml_fictionbook2.rb')
-rw-r--r--lib/sisu/v5/xml_fictionbook2.rb9
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)