class TestOptions(LegacyTestCase): location = os.path.join(parent_test_dir, 'options') lazy_ol_off = Kwargs(lazy_ol=False) html4 = Kwargs(output_format='html4') no_attributes = Kwargs(enable_attributes=False) no_smart_emphasis = Kwargs(smart_emphasis=False)
class TestExtensionsExtra(LegacyTestCase): location = os.path.join(parent_test_dir, 'extensions/extra') default_kwargs = Kwargs(extensions=['markdown.extensions.extra']) loose_def_list = Kwargs(extensions=['markdown.extensions.def_list']) simple_def_lists = Kwargs(extensions=['markdown.extensions.def_list']) abbr = Kwargs(extensions=['markdown.extensions.abbr']) footnotes = Kwargs(extensions=['markdown.extensions.footnotes']) tables = Kwargs(extensions=['markdown.extensions.tables']) tables_and_attr_list = Kwargs( extensions=['markdown.extensions.tables', 'markdown.extensions.attr_list'] ) extra_config = Kwargs( extensions=['markdown.extensions.extra'], extension_configs={ 'markdown.extensions.extra': { 'markdown.extensions.footnotes': { 'PLACE_MARKER': '~~~placemarker~~~' } } } )
class TestHr(TestCase): default_kwargs = Kwargs(extensions=[FancyBoxExtension()], ) def test_with_width(self): self.assertMarkdownRenders( # The Markdown source text used as input self.dedent(""" !![Registration](../../assets/images/qfieldcloud_registration.png, 69px) """), # The expected HTML output self.dedent(""" <p> <figure><a data-caption="Registration" data-fancybox="gallery" href="../../assets/images/qfieldcloud_registration.png"><img alt="Registration" src="../../assets/images/qfieldcloud_registration.png" title="Registration" width="69px"></a><figcaption>Registration</figcaption> </figure> </p> """), # Other keyword arguments to pass to `markdown.markdown` output_format='html') def test_without_width(self): self.assertMarkdownRenders( # The Markdown source text used as input self.dedent(""" !![Registration](../../assets/images/qfieldcloud_registration.png) """), # The expected HTML output self.dedent(""" <p> <figure><a data-caption="Registration" data-fancybox="gallery" href="../../assets/images/qfieldcloud_registration.png"><img alt="Registration" src="../../assets/images/qfieldcloud_registration.png" title="Registration" width="600px"></a><figcaption>Registration</figcaption> </figure> </p> """), # Other keyword arguments to pass to `markdown.markdown` output_format='html')
class TestExtensions(LegacyTestCase): location = os.path.join(parent_test_dir, 'extensions') exclude = ['codehilite'] attr_list = Kwargs(extensions=['attr_list', 'def_list', 'smarty']) codehilite = Kwargs(extensions=['codehilite']) toc = Kwargs(extensions=['toc']) toc_invalid = Kwargs(extensions=['toc']) toc_out_of_order = Kwargs(extensions=['toc']) toc_nested = Kwargs( extensions=['toc'], extension_configs={'toc': {'permalink': True}} ) toc_nested2 = Kwargs( extensions=['toc'], extension_configs={'toc': {'permalink': "[link]"}} ) toc_nested_list = Kwargs(extensions=['toc']) wikilinks = Kwargs(extensions=['wikilinks']) github_flavored = Kwargs(extensions=['fenced_code']) sane_lists = Kwargs(extensions=['sane_lists']) nl2br_w_attr_list = Kwargs(extensions=['nl2br', 'attr_list']) admonition = Kwargs(extensions=['admonition']) smarty = Kwargs( extensions=['smarty'], extension_configs={'smarty': {'smart_angled_quotes': True}} )