diff options
author | Ralph Amissah <ralph@amissah.com> | 2015-03-19 18:38:21 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2015-03-23 21:46:12 -0400 |
commit | 64dfdccbc0a136aab15c53ef0375244a28895429 (patch) | |
tree | d1cca15d22480dfb9e31765bd6160e72aab0c102 /lib/sisu/develop/ao_misc_arrange.rb | |
parent | d: manifest add html ids to label/identify content (diff) |
d: ao & elsewhere, use of map & select
Diffstat (limited to 'lib/sisu/develop/ao_misc_arrange.rb')
-rw-r--r-- | lib/sisu/develop/ao_misc_arrange.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/sisu/develop/ao_misc_arrange.rb b/lib/sisu/develop/ao_misc_arrange.rb index d474f553..8f8fe368 100644 --- a/lib/sisu/develop/ao_misc_arrange.rb +++ b/lib/sisu/develop/ao_misc_arrange.rb @@ -189,7 +189,6 @@ module SiSU_AO_MiscArrangeText end def prepare_text data=@data - data_new=[],[] if data[0] =~ /^#!\s*(?:\/usr\/bin\/env sisu|\/usr\/bin\/sisu)/ # remove bang from top #! (however file is stripped, so will be removed provided no content precedes it) data[0]=data[0].gsub(/^#!\s*\/usr\/bin\/sisu/,''). gsub(/^#!\s*\/usr\/bin\/env sisu/,'') @@ -198,11 +197,10 @@ module SiSU_AO_MiscArrangeText data[0]=data[0].gsub(/^(SiSU\s*[\d.]*)$/,'% \1'). gsub(/^(sisu-[\d.]+)$/,'% \1') end - data.each do |para| + data.each.map do |para| para=conditional_headings(para) - data_new << markup_blocks(para) - end - data_new=data_new.flatten + markup_blocks(para) + end.flatten end end end |