|
}
end
def table_end(tablefoot='')
%{ #{@vz.margin_num}#{@vz.margin_num} #{@vz.table_close}
#{tablefoot}}
end
def table_row(inf,h=false)
bold=if h; ''
else ''
end
%{
#{@vz.paragraph_table}#{bold}}
end
def table_cell(inf,h=false)
if h; %{ | #{@vz.paragraph_table}}
else %{ | #{@vz.paragraph_table}}
end
end
def table_row_close(h=false)
bold_close=if h; ''
else ''
end
"#{bold_close} | "
end
def table
m=@parablock[//,1]
@@tablefoot << m if m
@parablock.gsub!(//,'')
@@tablehead=1 if @parablock =~//u; @parablock=table_head($1)
end
if @parablock =~//
tablefoot=[]
@@tablefoot.each {|x| tablefoot << ''}
@@tablefoot=[]
if @parablock =~//; @parablock=table_end
end
end
if @@tablehead == 1
if @parablock =~/¡¡/u
if @parablock =~//
@parablock.gsub!(/!>/,table_row_close(true))
end
@@tablehead=0
end
@parablock
else
if @parablock =~//
@parablock.gsub!(/!>/,table_row_close)
end
@parablock
end
@parablock
end
def table_split
@new_content=[]
@one.split(/\n/).each do |parablock|
table=Table.new("#{parablock}\n")
@new_content << table.table
end
@new_content.join
end
end
end
__END__
|