lib/wovnrb/html_replacers/image_replacer.rb in wovnrb-0.2.02 vs lib/wovnrb/html_replacers/image_replacer.rb in wovnrb-0.2.03

- old
+ new

@@ -33,10 +33,10 @@ end if node.get_attribute('alt') alt = node.get_attribute('alt').strip if @text_index[alt] && @text_index[alt][lang.lang_code] && @text_index[alt][lang.lang_code].size > 0 - node.attribute('alt').value = alt.gsub(/^(\s*)[\S\s]*(\s*)$/, '\1' + @text_index[alt][lang.lang_code][0]['data'] + '\2') + node.attribute('alt').value = replace_text(alt, @text_index[alt][lang.lang_code][0]['data']) end end end end end