def new_char()
if @check_cell_data == 1
case
when current_char != '|' && @start_caption == false && (self.rows[-1][-1].nil? || self.rows[-1][-1][:style].blank?)
self.next_cell() if self.rows[-1][-1].nil?
self.rows[-1][-1][:style] = self.data
self.data = ""
when current_char != '|' && @start_caption == true && self.table_caption_attributes.blank?
self.table_caption_attributes = self.data
self.data = ""
end
@check_cell_data = 0
end
case
when current_char == "|" && (previous_char == "\n" || previous_char == "|") && @in_quotes == false
self.data.chop! if self.data[-1,1] == "|"
self.next_cell() unless self.data.blank? && previous_char == "|"
self.data = ""
when current_char == "!" && (previous_char == "\n" || previous_char == "!") && @in_quotes == false
self.data.chop!
self.next_cell('th')
self.data = ""
when current_char == '}' && previous_char == '|'
self.data = ""
self.rows[-1].pop
return false
when current_char == '+' && previous_char == '|' && @in_quotes == false
self.data = ""
self.rows[-1].pop
@start_caption = true
when current_char == '|' && previous_char != "\n" && @in_quotes == false
@check_cell_data = 1 unless @start_table
when current_char == "\n" && @start_caption == true && @in_quotes == false
@start_caption = false
self.table_caption = self.data
self.data = ""
when current_char == '"' && previous_char != '\\'
@in_quotes = !@in_quotes
self.data += '"'
when current_char == "\n" && @start_table == true && @in_quotes == false
@start_table = false
unless self.data.blank?
self.current_param = self.data
self.params << ""
end
self.data = ""
when current_char == "\n" && @start_row == true && @in_quotes == false
@start_row = false
unless self.data.blank?
self.current_param = self.data
end
self.data = ""
when current_char == '-' && previous_char == '|' && @in_quotes == false
self.data.chop!
self.rows[-1].pop
self.next_row()
@start_row = true
else
self.data << current_char
end
return true
end