Skip to content

Commit

Permalink
Improve index generation:
Browse files Browse the repository at this point in the history
- Update Makefile to regenerate 'uni.md' if the 'bookindex.md' file has changed
- Improve 'mkindex.pl' to:
   - Add an explicit section id, '{#everything-curl-index}', to the top of the bookindex.md file
   - Track whether a code block with ``` has been seen, to avoid treating '# foo' comments within code blocks as sections to link to in indexes.  This fixes such bad index links as
     "clone: [Install GCC for x86_64](get/win-msys2.md#install-gcc-for-x86_64),"
   - Strip more characters that aren't legal in CSS Ids: those IDs should begin with a letter or an underscore, and should contain only letters, numbers, underscore or dash after the first char.  (See https://stackoverflow.com/questions/448981/which-characters-are-valid-in-css-class-names-selectors )  This fixes a few IDs that contains '?', '\', '!'
   - Sorting seems to have been corrected for items that reference "All options", but I didn't dig into how/why too much since the result is an improvement.
- Update 'bookindex.md' with regenerated index from above improvements to 'mkindex.pl'
  • Loading branch information
sluicing authored and bagder committed Dec 28, 2023
1 parent fc38f22 commit 34f936e
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ wordcheck:
fixup:
for i in $(MDS); do ./lang.sh $$i; done

uni.md: uni.pl $(MDS) SUMMARY.md
uni.md: uni.pl $(MDS) SUMMARY.md $(OUT)
./uni.pl SUMMARY.md >$@

everything-curl.pdf: uni.md
Expand Down
Loading

0 comments on commit 34f936e

Please sign in to comment.