ci: Update Pandoc version from 2.x to 3.x

This commit is contained in:
Justin Mayer 2026-10-11 17:46:12 +02:00
commit fe9cb75137
3 changed files with 7 additions and 5 deletions

View file

@ -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

View file

@ -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.</li>
</ul>
<pre>
<code>
<pre><code>
a = [1, 2, 3]
b = [4, 5, 6]
for i in zip(a, b):
print i
</code>
</pre>
</code></pre>
<p>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

View file

@ -107,6 +107,10 @@ def decode_wp_content(content, br=True):
content = _multi_replace(pre_tags, content)
# Pandoc >= 3 only treats <pre><code> as a code block when the tags are adjacent
content = re.sub(r"<pre([^>]*)>\s*<code", r"<pre\1><code", content)
content = re.sub(r"</code>\s*</pre>", "</code></pre>", content)
# convert [caption] tags into <figure>
content = re.sub(
r"\[caption(?:.*?)(?:caption=\"(.*?)\")?\]"