mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
The markdown import of pandoc is their own flavour of markdown. It for instance uses fenced divs[1] which are not supported by python-markdown. When importing content from Wordpress, there is several issues as explained in discussion 3113[2] This change follows a discussion with pandoc developer[3] [1] https://pandoc.org/MANUAL.html#divs-and-spans [2] https://github.com/getpelican/pelican/discussions/3113 [3] https://fosstodon.org/@pandoc/110105559949588768 Take the following Wordpress blog post sample: ```html <p><!-- wp:paragraph --></p> <p>Paragraph content</p> <p><!-- /wp:paragraph --></p> <p><!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} --></p> <div class="wp-block-image"> <figure class="aligncenter size-full"><img src="https://test.com/test.jpg" alt="" class="wp-image-3747" title="Some title"/><br /> <figcaption><em>Some caption</em></figcaption> </figure> </div> <p><!-- /wp:image --></p> ``` Before this commit: was imported as ```md `<!-- wp:paragraph -->`{=html} Paragraph content `<!-- /wp:paragraph -->`{=html} `<!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} -->`{=html} ::: wp-block-image <figure class="aligncenter size-full"> <img src="https://test.com/test.jpg" title="Some title" class="wp-image-3747" /><br /> <figcaption><em>Some caption</em></figcaption> </figure> ::: `<!-- /wp:image -->`{=html} ``` After this change: ```md <!-- wp:paragraph --> Paragraph content <!-- /wp:paragraph --> <!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} --> <div class="wp-block-image"> <figure class="aligncenter size-full"> <img src="https://test.com/test.jpg" title="Some title" class="wp-image-3747" /><br /> <figcaption><em>Some caption</em></figcaption> </figure> </div> <!-- /wp:image --> ``` Fixes #3113 |
||
|---|---|---|
| .. | ||
| content | ||
| cyclic_intersite_links | ||
| dummy_plugins | ||
| mixed_content | ||
| nested_content/maindir | ||
| output | ||
| parse_error | ||
| TestPages | ||
| theme_overrides | ||
| __init__.py | ||
| default_conf.py | ||
| support.py | ||
| test_cache.py | ||
| test_cli.py | ||
| test_contents.py | ||
| test_generators.py | ||
| test_importer.py | ||
| test_log.py | ||
| test_paginator.py | ||
| test_pelican.py | ||
| test_plugins.py | ||
| test_readers.py | ||
| test_rstdirectives.py | ||
| test_server.py | ||
| test_settings.py | ||
| test_testsuite.py | ||
| test_urlwrappers.py | ||
| test_utils.py | ||