#!/usr/bin/env bash set -euo pipefail html_dir="${1:-build/docs/html}" index_file="${html_dir%/}/index.html" if [[ ! -f "${index_file}" ]]; then echo "error: ${index_file} not found" >&2 exit 1 fi perl -0pi -e 's{
\s*
.*?
\s*
\s*}{}s' "${index_file}"