lib/maruku/input/parse_block.rb
#
# count the actual number of elements in a row taking into account colspans
#
count the actual number of elements in a row taking into account colspans
count the actual number of elements in a row taking into account colspans
def count_columns(row)
    colCount = 0
    row.each do |cell|
      if cell.al && cell.al.size > 0
        al = find_colspan(cell.al)
        if al != nil
          colCount += al[1].to_i
        else
          colCount += 1
        end
      else
        colCount += 1
      end
    end
    colCount
  end
def count_columns ( row ) colCount = 0 row . each do | cell | if cell . al && cell . al . size > 0 al = find_colspan ( cell . al ) if al != nil colCount += al [ 1 ] . to_i else colCount += 1 end else colCount += 1 end end colCount end
count the actual number of elements in a row taking into account colspans
count the actual number of elements in a row taking into account colspans
row