parameters: (self, line, offset)
return_statement: return cols
docstring: Given a column span underline, return a list of (begin, end) pairs.
docstring_summary: Given a column span underline, return a list of (begin, end) pairs.
docstring_tokens: Given a column span underline return a list of ( begin end ) pairs .
function: def parse_columns(self, line, offset):
          """
          Given a column span underline, return a list of (begin, end) pairs.
          """
          cols = []
          end = 0
          while True:
              begin = line.find('-', end)
              end = line.find(' ', begin)
              if begin < 0:
                  break
              if end < 0:
                  end = len(line)
              cols.append((begin, end))
          if self.columns:
              if cols[-1][1] != self.border_end:
                  raise TableMarkupError('Column span incomplete in table '
                                         'line %s.' % (offset+1),
                                         offset=offset)
              # Allow for an unbounded rightmost column:
              cols[-1] = (cols[-1][0], self.columns[-1][1])
          return cols
function_tokens: def parse_columns ( self , line , offset ) : cols = [ ] end = 0 while True : begin = line . find ( '-' , end ) end = line . find ( ' ' , begin ) if begin < 0 : break if end < 0 : end = len ( line ) cols . append ( ( begin , end ) ) if self . columns : if cols [ - 1 ] [ 1 ] != self . border_end : raise TableMarkupError ( 'Column span incomplete in table ' 'line %s.' % ( offset + 1 ) , offset = offset ) # Allow for an unbounded rightmost column: cols [ - 1 ] = ( cols [ - 1 ] [ 0 ] , self . columns [ - 1 ] [ 1 ] ) return cols