From fe9cb7513700dd664e07f466fd9b85272ef2d09f Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Sun, 11 Oct 2026 17:46:12 +0200 Subject: [PATCH] ci: Update Pandoc version from 2.x to 3.x --- .github/workflows/main.yml | 2 +- pelican/tests/content/wordpress_content_decoded | 6 ++---- pelican/tools/pelican_import.py | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 06d90677..add29ec3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: - name: Install pandoc uses: r-lib/actions/setup-pandoc@v2 with: - pandoc-version: "2.9.2" + pandoc-version: "3.12.1" - name: Install tox run: python -m pip install -U pip tox - name: Info diff --git a/pelican/tests/content/wordpress_content_decoded b/pelican/tests/content/wordpress_content_decoded index 6e91338c..f38ffe1e 100644 --- a/pelican/tests/content/wordpress_content_decoded +++ b/pelican/tests/content/wordpress_content_decoded @@ -32,14 +32,12 @@ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
-
+

   a = [1, 2, 3]
   b = [4, 5, 6]
   for i in zip(a, b):
     print i
-
-
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 1c03f9c9..f6418e81 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -107,6 +107,10 @@ def decode_wp_content(content, br=True): content = _multi_replace(pre_tags, content) + # Pandoc >= 3 only treats

 as a code block when the tags are adjacent
+    content = re.sub(r"]*)>\s*\s*
", "", content) + # convert [caption] tags into
content = re.sub( r"\[caption(?:.*?)(?:caption=\"(.*?)\")?\]"