'End current TextBlock. Create new TextBlock with the same styles.'

def end_current_block(self):

    if self.current_para.contents:
        self.current_block.append(self.current_para)
        self.current_para = Paragraph()
    if (self.current_block.contents or self.current_block.must_append):
        self.current_page.append(self.current_block)
        self.current_block = self.book.create_text_block(textStyle=self.current_block.textStyle, blockStyle=self.current_block.blockStyle)
