Beispiel #1
0
 def test_page(title, filename, config):
     test_page = Page(
         title,
         File(filename, config['docs_dir'], config['site_dir'],
              config['use_directory_urls']), config)
     test_page.content = """
         <h1 id="heading-1">Heading 1</h1>
         <p>Content 1</p>
         <h2 id="heading-2">Heading 2</h1>
         <p>Content 2</p>
         <h3 id="heading-3">Heading 3</h1>
         <p>Content 3</p>"""
     test_page.markdown = dedent("""
         # Heading 1
         ## Heading 2
         ### Heading 3""")
     test_page.toc = get_toc(get_markdown_toc(test_page.markdown))
     return test_page