From 99a1c4e0154de2553789c71904deec690238beb3 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 17 Mar 2024 21:45:12 -0400 Subject: [PATCH] Support for pandoc 2.19.2 Previous I had been using pandoc 2.9.2.1, available through the Debian repositories. I installed 2.19.2 through Guix. The biggest issue I ran into was wrapping of the output, which messed up my klugy post-processing scripts that expected `h1` tags to have their attributes all on the same line. The `--wrap none` flag resolves that. I diff'd the webroot before and after these changes. The primary changes were related to footnote classes, the recognition of fancy quotes in a couple new situations, and new classes introduced to source code listings. I'll have to investigate styling them, since I haven't visited the CSS for that in quite some time. --- src/h12title | 10 ++++++++-- src/post2html | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/h12title b/src/h12title index b5f6026..a004f75 100755 --- a/src/h12title +++ b/src/h12title @@ -36,9 +36,15 @@ main() | grep ')[^<]+' \ - ) + ) || { + echo 'error: h12title: failed to locate heading' >&2 + exit 1 + } - sed "s#$placeholder#${title/&/\\&}#" <<< "$body" + sed "s#$placeholder#${title/&/\\&}#" <<< "$body" || { + printf "error: h12title: failed title replacement: '%s'\n" "$title" >&2 + exit 1 + } } main "$@" diff --git a/src/post2html b/src/post2html index b332338..7fca77d 100755 --- a/src/post2html +++ b/src/post2html @@ -135,7 +135,7 @@ main() pandoc -f"$( pexts )" -thtml5 \ --standalone --template src/pandoc.tpl \ --metadata pagetitle:ignoreme \ - --base-header-level=1 \ + --wrap none \ -B <( src/mkheader post @__PAGE_TITLE__@ ) \ -A src/footer.tpl.htm \ < <( prefmt < "$file" ) \