From 335008e55553da03b630b1ac4b158c9c43b49e07 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 25 Jun 2013 00:06:57 -0400 Subject: v5: "general code cleaning" fix --- lib/sisu/v5/dal_doc_str.rb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v5/dal_doc_str.rb b/lib/sisu/v5/dal_doc_str.rb index 971f9f67..70c2e61f 100644 --- a/lib/sisu/v5/dal_doc_str.rb +++ b/lib/sisu/v5/dal_doc_str.rb @@ -452,17 +452,19 @@ module SiSU_DAL_DocumentStructureExtract and t_o !~/^(?:\}(?:verse|code|alt|group|block)|(?:verse|code|alt|group|block)\{)/ # fix logic sub_array=t_o.dup @line_mode=sub_array.scan(/.+/) - type='poem' if @@flag['poem'] - t_o=SiSU_DAL_DocumentStructureExtract::Build.new(@md,@line_mode).build_lines(type).join - poem=t_o.split(/\n\n/) - poem.each do |v| - v=v.gsub(/\n/m,"#{Mx[:br_nl]}\n") - obj,tags=extract_tags(v) - h={ obj: obj, tags: tags } - t_o=SiSU_DAL_DocumentStructure::ObjectBlockTxt.new.verse(h) - tuned_file << t_o + type=if @@flag['poem'] + t_o=SiSU_DAL_DocumentStructureExtract::Build.new(@md,@line_mode).build_lines(type).join + poem=t_o.split(/\n\n/) + poem.each do |v| + v=v.gsub(/\n/m,"#{Mx[:br_nl]}\n") + obj,tags=extract_tags(v) + h={ obj: obj, tags: tags } + t_o=SiSU_DAL_DocumentStructure::ObjectBlockTxt.new.verse(h) + tuned_file << t_o + end + 'poem' + else 'group' end - else 'group' end @verse_count+=1 if @@flag['poem'] end -- cgit v1.2.3