updated markdown_generate_index.sh

pull/16/head
Hari Sekhon 1 month ago
parent ab4d89e562
commit 9a459fe05c

@ -43,8 +43,12 @@ if ! [ -f "$markdown_file" ]; then
die "File not found: $markdown_file"
fi
# sed strip out ```code``` blocks to avoid # comments inside code blocks from going into the index
# tail -n +2 takes off the first line which is the header we definitely don't want in the index
grep -E '^#+[[:space:]]' "$markdown_file" |
# false positive
# shellcheck disable=SC2016
sed '/```/,/```/d' "$markdown_file" |
grep -E '^#+[[:space:]]' |
tail -n +2 |
# don't include main headings
#sed '/^#[[:space:]]/d' |

Loading…
Cancel
Save