paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f47840963ad976bf94517ddaccc3fa8757da7042
parent 650d15779088b8cdff4b6477183e464d985f6b26
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Tue, 31 Dec 2019 01:14:20 -0500

Fix bug where sub/subsubsection links were broken

Diffstat:
Mcompile | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/compile b/compile @@ -181,12 +181,16 @@ for page in $@; do sectionNameNS=$(sed -e 's/ //g' <<< "$sectionName") sed -i "/toc-title/a <ul><ul><li><a href=\"#$sectionNameNS\">$sectionName</a></li></ul></ul>" \ $htmldir/$savepath/$pagename.html + sed -i "/<h5>$sectionName<\/h5>/i <a id=\"$sectionNameNS\"></a>" \ + $htmldir/$savepath/$pagename.html # Check if this is supposed to be a sub-section & add <ul> elif echo "$sectionName" | grep -qi "^sub:"; then sectionName=${sectionName:4} sectionNameNS=$(sed -e 's/ //g' <<< "$sectionName") sed -i "/toc-title/a <ul><li><a href=\"#$sectionNameNS\">$sectionName</a></li></ul>" \ $htmldir/$savepath/$pagename.html + sed -i "/<h4>$sectionName<\/h4>/i <a id=\"$sectionNameNS\"></a>" \ + $htmldir/$savepath/$pagename.html # Otherwise, this is a normal section else sectionNameNS=$(sed -e 's/ //g' <<< "$sectionName")