diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-03-01 20:41:28 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-03-01 20:41:28 -0500 |
commit | 05a3fd233ec1ac4475bd797449d1284f6824c005 (patch) | |
tree | fdd93c057196640ec4907f58f66cf5bc00dfbdf6 /lib/sisu/v3/shared_markup_alt.rb | |
parent | v3: use rb1.9.2 "require_relative" syntax (diff) |
v3: ruby 1.9 hash symbol syntax adopted
Diffstat (limited to 'lib/sisu/v3/shared_markup_alt.rb')
-rw-r--r-- | lib/sisu/v3/shared_markup_alt.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/sisu/v3/shared_markup_alt.rb b/lib/sisu/v3/shared_markup_alt.rb index 55f2065d..738ec75a 100644 --- a/lib/sisu/v3/shared_markup_alt.rb +++ b/lib/sisu/v3/shared_markup_alt.rb @@ -4,7 +4,6 @@ * Name: SiSU * Description: a framework for document structuring, publishing and search - #___# * Author: Ralph Amissah @@ -227,7 +226,7 @@ module SiSU_text_representation def dgst en_dgst,img_dgst={},{} txt_dgst=digest(txt) - {:txt=>txt,:dgst_txt=>txt_dgst} + { txt: txt, dgst_txt: txt_dgst } end self end @@ -237,7 +236,7 @@ module SiSU_text_representation end def dgst txt_dgst=digest(txt) - {:txt=>txt,:dgst_txt=>txt_dgst} + { txt: txt, dgst_txt: txt_dgst } end self end @@ -275,7 +274,7 @@ module SiSU_text_representation image_name = i + ' [image missing]' image_dgst = '' end - line_image << {:img_dgst=>image_dgst[1],:img_name=>image_name,:img_type=>img_type} + line_image << { img_dgst: image_dgst[1], img_name: image_name, img_type: img_type } end end line_image @@ -287,7 +286,7 @@ module SiSU_text_representation note_no=e.gsub(/^([\d*+]+)\s+.+/,'\1') e=digest(stripped_clean(e)) note_dgst=digest(e) - en_dgst << {:note_number=>note_no,:note_dgst=>note_dgst} + en_dgst << { note_number: note_no, note_dgst: note_dgst } end end en_dgst @@ -307,7 +306,7 @@ module SiSU_text_representation imgs=@t_o.obj.scan(rgx_image).flatten line_image=images(imgs) end - dgst={:is=>@t_o.is,:ocn=>@t_o.ocn,:dgst_stripped_txt=>txt_stripped_dgst,:dgst_markedup_txt=>txt_markup_reverted_dgst} + dgst={ is: @t_o.is, ocn: @t_o.ocn, dgst_stripped_txt: txt_stripped_dgst, dgst_markedup_txt: txt_markup_reverted_dgst } dgst[:endnotes]=endnotes_dgst if endnotes_dgst and endnotes_dgst.length > 0 dgst[:images]=line_image if line_image and line_image.length > 0 end |