From 6b7d170738b4beac4223c9a29255a9044b63bf76 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 4 Apr 2023 17:53:27 -0300 Subject: v2: Recove h[2-6] anchor link and icon --- v2/src/development/genhtml.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'v2/src/development/genhtml.sh') diff --git a/v2/src/development/genhtml.sh b/v2/src/development/genhtml.sh index f3a6e3a..1b2718a 100755 --- a/v2/src/development/genhtml.sh +++ b/v2/src/development/genhtml.sh @@ -192,19 +192,20 @@ add_headings_anchors() { ( IFS='' while read -r line; do - if ! printf '%s' "$line" | grep -q '^'; then + if ! printf '%s' "$line" | grep -q "^$INDENT"; then printf '%s\n' "$line" continue fi - LVL="$(printf '%s' "$line" | sed 's|^.*|\1|')" - HEADING="$(printf '%s' "$line" | sed 's|^\(.*\)$|\1|')" + LVL="$(printf '%s' "$line" | sed "s|^$INDENT.*|\1|")" + HEADING="$(printf '%s' "$line" | sed "s|^$INDENT\(.*\)$|\1|")" SLUG="$(slugify_once "$HEADING")" - printf '%s\n' \ + printf '%s%s\n' \ + "$INDENT" \ "$LVL" \ "$SLUG" \ "$HEADING" \ "$SLUG" \ - "$(url-for 'static/link.svg')" \ + "${icon_link_url:?}" \ "$LVL" done ) -- cgit v1.2.3