Sha256: c4bbacf17ab842332d5a9c07e7a920cfd4857202ec00d6c4f4b76e37d6bf8a20
Contents?: true
Size: 441 Bytes
Versions: 6
Compression:
Stored size: 441 Bytes
Contents
def apply_text_html(config, data) begin require 'rubygems' rescue LoadError end require 'hpricot' data.collect {|d| doc = Hpricot(d.to_s.toutf8) texts = [] doc.traverse_text {|text| texts << text.to_s } data2 = eval_pragger(config, texts) result_html = d.to_s.toutf8 Hash[*texts.zip(data2).flatten].each {|k,v| result_html.sub!(k,v) } result_html } end
Version data entries
6 entries across 6 versions & 1 rubygems