diff options
Diffstat (limited to 'make-index')
-rwxr-xr-x | make-index | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -9,8 +9,16 @@ set lines {} set commands {} array set cdict {} set c 0 +set numlist 1 while {[gets $f buf] >= 0} { + # Handle auto numbered lists + if {[string match "#. *" $buf]} { + set buf "$numlist. [string range $buf 3 end]" + incr numlist + } elseif {$buf eq ""} { + set numlist 1 + } if {[string match "~~*" $buf]} { if {[string match "*: *" $prev]} { incr c @@ -29,6 +37,8 @@ while {[gets $f buf] >= 0} { } } } + # Handle TIP nnn references + regsub -all {TIP ([0-9]+)} $buf {https://core.tcl-lang.org/tips/doc/main/tip/\1.md[TIP \1]} buf lappend lines $buf set prev $buf } |