lib/nineteen/eighty/two/formatters/html_table_formatter.rb in nineteen-eighty-two-0.1.3 vs lib/nineteen/eighty/two/formatters/html_table_formatter.rb in nineteen-eighty-two-0.1.4
- old
+ new
@@ -2,14 +2,14 @@
module Eighty
module Two
module Formats
class HTMLTable
def self.format text
- lines = Spectrum[text]
+ lines = Spectrum[*text]
t = File.read File.open File.join Nineteen::Eighty::Two.templates_dir, 'html', 'table', 'table.eruby'
context = {
- title: text,
+ title: text.to_s.gsub('"', ''),
blanks: blanks(lines.first),
rows: lines.map { |l| row(l) }.join("\n")
}
Erubis::Eruby.new(t).evaluate(context).strip
end