def get_cell_markup(self, x, y=None, data=None):
"""
See if a column has formatting (if x and y are supplied) or
see if a cell has formatting. If it does, return the formatted
string, otherwise return data that is escaped (if that column
has formatting), or just the plain data.
"""
if x in self._cell_markup:
if y is None:
return True # markup for this column
elif y in self._cell_markup[x]:
return self._cell_markup[x][y]
else:
return escape(data)
else:
if y is None:
return False # no markup for this column
else:
return data
评论列表
文章目录