def test_render_heading(self): renderer = TOCRenderer() token = Heading(['### some *text*\n']) rendered_heading = renderer.render_heading(token) self.assertEqual(renderer._headings[0], (3, 'some text'))
def test_render_heading(self): renderer = TOCRenderer() Heading.start('### some *text*\n') token = Heading(Heading.read(iter(['foo']))) rendered_heading = renderer.render_heading(token) self.assertEqual(renderer._headings[0], (3, 'some text'))
def test_render_heading(self): renderer = TOCRenderer() Heading.start("### some *text*\n") token = Heading.read(SourceLines(["foo"]), expand_spans=True) renderer.render_heading(token) self.assertEqual(renderer._headings[0], (3, "some text"))