aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/dal_doc_str.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-06-25 00:06:57 -0400
committerRalph Amissah <ralph@amissah.com>2013-06-25 00:06:57 -0400
commit335008e55553da03b630b1ac4b158c9c43b49e07 (patch)
tree6f69383ecce32e068d1a4378e698cb97cbbcd092 /lib/sisu/v5/dal_doc_str.rb
parentv4 v5: version & changelog (diff)
v5: "general code cleaning" fix
Diffstat (limited to 'lib/sisu/v5/dal_doc_str.rb')
-rw-r--r--lib/sisu/v5/dal_doc_str.rb22
1 files changed, 12 insertions, 10 deletions
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