Esempio n. 1
0
    def insert(self):
        if DEBUG:
            print('Adding placeholder...')

        self.section.type = 'markdown'
        if isinstance(self.section.contents, str):
            self.section.contents = markdown_to_section_list(
                self.section.contents)
        else:
            self.section.contents = markdown_to_section_list(
                self.section.contents['text'])
        markdown.invoke(self.cell_object, self.section)
Esempio n. 2
0
def transform_section(sane_section: dict):
    section = sane_to_section(sane_section)

    if section.type == 'markdown':
        section.contents = markdown_to_section_list(section.contents)

    return section