From: Paul Hänsch Date: Sun, 27 Sep 2026 11:02:04 +0000 (+0200) Subject: bugfix: faulty depth counter for recurring H1 sections X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=1356aba94deb31b278fbdf9342abf93bd84c0c84;p=shellwiki bugfix: faulty depth counter for recurring H1 sections --- diff --git a/handlers/70_slideshow.sh b/handlers/70_slideshow.sh index 3e6b813..9b01b98 100755 --- a/handlers/70_slideshow.sh +++ b/handlers/70_slideshow.sh @@ -104,12 +104,13 @@ wiki "$page" | { if [ "$depth" -eq 1 ]; then printf '%s\nprevious' \ "${tag}" "$sl_pre" + depth=$((depth - 1)) elif [ "$depth" -eq 0 ]; then : # ignore "hanging" closing tag from unwrapped H1 section else printf %s "${tag}" + depth=$((depth - 1)) fi - depth=$((depth - 1)) tag='' ;; *\)