diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-12-12 14:58:58 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-12-12 14:58:58 -0500 |
commit | 1beb5aa3c376dbef89bc33024216650529ef7262 (patch) | |
tree | 1682500089c14fd49bcf52a3a001e291fadd5f75 /lib/sisu/v3/dal_character_check.rb | |
parent | debian/changelog (3.3.2-1) (diff) | |
parent | v3: 3.3.3 version & changelog, dates touched (diff) |
Merge tag 'sisu_3.3.3' into debian/sid
Diffstat (limited to 'lib/sisu/v3/dal_character_check.rb')
-rw-r--r-- | lib/sisu/v3/dal_character_check.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sisu/v3/dal_character_check.rb b/lib/sisu/v3/dal_character_check.rb index fdba5086..f20d4106 100644 --- a/lib/sisu/v3/dal_character_check.rb +++ b/lib/sisu/v3/dal_character_check.rb @@ -78,8 +78,6 @@ module SiSU_DAL_CharacterCheck gsub(/<br>/,"#{Mx[:br_line]}"). #needed by xml, xhtml etc. gsub(/\t/,' '). gsub(/\342\200\231/u,"'"). #if dob =~/’/ #Avoid #‘ ’ #“ ” - gsub(/�/u,' '). #watch, replace with char code - gsub(/·/u,'*'). gsub(/\\copy(?:right)?\b/,'©'). gsub(/\\trademark\b|\\tm\b/,'®') dob.obj=dob.obj + "\n" @@ -87,13 +85,15 @@ module SiSU_DAL_CharacterCheck case dob.obj when /\^~/ #% Note must do this first (earlier loop) and then enter gathered data into ~^\d+ sub_dob=dob.obj.dup - @endnote_array << sub_dob.gsub(/\n/,'').gsub(/\^~\s+(.+)\s*/,%{#{Mx[:en_a_o]}#{endnote_no} \\1 #{Mx[:en_a_c]}}).strip + @endnote_array << sub_dob.gsub(/\n/,''). + gsub(/\^~\s+(.+)\s*/,%{#{Mx[:en_a_o]}#{endnote_no} \\1 #{Mx[:en_a_c]}}). + strip endnote_no+=1 dob=nil if dob.obj =~/\^~ .+/ #watch, removes 'binary' endnote now in endnote array for later insertion end end end - @tuned_file << dob unless dob.nil? + @tuned_file << dob if dob.is_a?(Object) end @tuned_file=@tuned_file.flatten.compact [@tuned_file,@endnote_array] |