diff options
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] |