From ad0785f6c2f184628401ac2c23708e342c44b3bc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 6 Sep 2026 01:13:34 +0200 Subject: [PATCH] Update pandoc to 3.11. Pandoc 3.11 appends the LaTeX caption label to Markdown table captions as a {#id} identifier; strip it in tablecaption() since the manual renderer has no identifiers. --- cmake/manual.cmake | 12 ++++++------ manual/latex2md.py | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cmake/manual.cmake b/cmake/manual.cmake index 68b49c78..623ec11c 100644 --- a/cmake/manual.cmake +++ b/cmake/manual.cmake @@ -1,4 +1,4 @@ -set(PANDOC_VERSION 3.9.0.2) +set(PANDOC_VERSION 3.11) find_package(Python3 COMPONENTS Interpreter REQUIRED) @@ -23,16 +23,16 @@ else() message(FATAL_ERROR "No pinned pandoc ${PANDOC_VERSION} binary for ${CMAKE_HOST_SYSTEM_PROCESSOR}; install pandoc ${PANDOC_VERSION}") endif() set(_pandoc_asset pandoc-${PANDOC_VERSION}-windows-x86_64.zip) - set(_pandoc_hash c97542f2800f446e788d9f74237856d995421ad1bb3cc8324286840c5f272d3a) + set(_pandoc_hash 2ab72baf2399450e148ddf7a2a8689806c42e1bba71862b57e220fd9b8456d3d) set(_pandoc_exe pandoc-${PANDOC_VERSION}/pandoc.exe) elseif(APPLE) if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)$") set(_pandoc_asset pandoc-${PANDOC_VERSION}-arm64-macOS.zip) - set(_pandoc_hash 6e9eca844076bcbb599bbeebbba78a70f93b5307782b85c2c272872812c88875) + set(_pandoc_hash 15806bedf9517bfead72e88fe6a6696635c3691efbb6e152173440e9c5bb50b4) set(_pandoc_exe pandoc-${PANDOC_VERSION}-arm64/bin/pandoc) elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64|amd64)$") set(_pandoc_asset pandoc-${PANDOC_VERSION}-x86_64-macOS.zip) - set(_pandoc_hash b9fbceabccbc8f34ac021a50483fc32f8160568d0b4b2c22d81bb29e3054fd82) + set(_pandoc_hash 3b1c1b57f160112c821d02f23d946ede8b7f57a6ccf4632a25a512d334a9291f) set(_pandoc_exe pandoc-${PANDOC_VERSION}-x86_64/bin/pandoc) else() message(FATAL_ERROR "No pinned pandoc ${PANDOC_VERSION} binary for ${CMAKE_HOST_SYSTEM_PROCESSOR}; install pandoc ${PANDOC_VERSION}") @@ -40,11 +40,11 @@ else() else() if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$") set(_pandoc_asset pandoc-${PANDOC_VERSION}-linux-arm64.tar.gz) - set(_pandoc_hash b6d21e8f9c3b15744f5a7ab40248019157ed7793875dbe0383d4c82ff572b528) + set(_pandoc_hash 56ed5566ec41d22ec9ee0704e6ac0b98ba102e92384efd5306173a22d314c79a) set(_pandoc_exe pandoc-${PANDOC_VERSION}/bin/pandoc) elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64|amd64)$") set(_pandoc_asset pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz) - set(_pandoc_hash a69abfababda8a56969a254b09f9553a7be89ddec00d4e0fe9fd585d71a67508) + set(_pandoc_hash 37edb3bbcf722f921a009941bf5874e2e0c09263226c9b4a2d980788cb062ab6) set(_pandoc_exe pandoc-${PANDOC_VERSION}/bin/pandoc) else() message(FATAL_ERROR "No pinned pandoc ${PANDOC_VERSION} binary for ${CMAKE_HOST_SYSTEM_PROCESSOR}; install pandoc ${PANDOC_VERSION}") diff --git a/manual/latex2md.py b/manual/latex2md.py index f6534ac5..ae9eca79 100644 --- a/manual/latex2md.py +++ b/manual/latex2md.py @@ -146,6 +146,7 @@ def tablecaption(text): incap = True line = '_' + line[2:] if incap and not line.endswith('\\'): + line = re.sub(r' \{#[^{}]+\}$', '', line) out.append(line + '_') incap = False continue