def serialize(self, context: SerializationContext): line = ''.join([i.serialize_inline(context) for i in self.text_items]) list_marker = self.get_list_marker(context) line = list_marker + line # TODO: override and extra formatting here context.lines.append(DocLine(line, indent=context.indent)) if not self.is_list_paragraph() and line: context.lines.append(DocLine(''))
def serialize_plain_table(self, context: SerializationContext): for row in self.rows: row_line = [] for cell in row.cells: cell_line = ' '.join( [item.serialize_inline(context) for item in cell]) row_line.append(cell_line) line = context.settings.table_col_st.join(row_line) context.lines.append(DocLine(line, context.indent))
def serialize(self, context: SerializationContext): line = self.serialize_inline(context) context.lines.append(DocLine(line))
def serialize(self, context: SerializationContext): context.lines.append(DocLine(self.text))